mirror of
https://github.com/typst/typst
synced 2025-05-16 10:05:28 +08:00
Simpler example for a regex (#2345)
This commit is contained in:
parent
0f24990579
commit
d1a702f3fd
@ -827,14 +827,13 @@ impl Repr for EcoString {
|
|||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```example
|
/// ```example
|
||||||
|
/// // Works with string methods.
|
||||||
|
/// #"a,b;c".split(regex("[,;]"))
|
||||||
|
///
|
||||||
/// // Works with show rules.
|
/// // Works with show rules.
|
||||||
/// #show regex("\d+"): set text(red)
|
/// #show regex("\d+"): set text(red)
|
||||||
///
|
///
|
||||||
/// The numbers 1 to 10.
|
/// The numbers 1 to 10.
|
||||||
///
|
|
||||||
/// // Works with string methods.
|
|
||||||
/// #("a,b;c"
|
|
||||||
/// .split(regex("[,;]")))
|
|
||||||
/// ```
|
/// ```
|
||||||
#[ty(scope)]
|
#[ty(scope)]
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user