diff options
| author | KillTheMule <KillTheMule@users.noreply.github.com> | 2023-10-10 12:50:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-10 12:50:39 +0200 |
| commit | d1a702f3fda49f7180ccde4f336fa725861be17f (patch) | |
| tree | d623f282c452757a75563a4716c59056f4c6df0e | |
| parent | 0f24990579382818c5e1d03679a226ad2d2b730b (diff) | |
Simpler example for a regex (#2345)
| -rw-r--r-- | crates/typst/src/eval/str.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/typst/src/eval/str.rs b/crates/typst/src/eval/str.rs index 8b6b766e..3bbfcc0b 100644 --- a/crates/typst/src/eval/str.rs +++ b/crates/typst/src/eval/str.rs @@ -827,14 +827,13 @@ impl Repr for EcoString { /// /// # Example /// ```example +/// // Works with string methods. +/// #"a,b;c".split(regex("[,;]")) +/// /// // Works with show rules. /// #show regex("\d+"): set text(red) /// /// The numbers 1 to 10. -/// -/// // Works with string methods. -/// #("a,b;c" -/// .split(regex("[,;]"))) /// ``` #[ty(scope)] #[derive(Debug, Clone)] |
