From d1a702f3fda49f7180ccde4f336fa725861be17f Mon Sep 17 00:00:00 2001 From: KillTheMule Date: Tue, 10 Oct 2023 12:50:39 +0200 Subject: [PATCH] Simpler example for a regex (#2345) --- crates/typst/src/eval/str.rs | 7 +++---- 1 file 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)]