summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/typst/src/eval/str.rs7
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)]