aboutsummaryrefslogtreecommitdiffstats
path: root/examples/lib.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-18 18:33:10 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-18 18:33:17 +0200
commit25e267afbc0789ea36508d45c3ea3545b84223bb (patch)
tree8dee2a78ad1df29e9df7cf151091a5d265fd7ecb /examples/lib.rs
parent1dbf02d8c1955316c6cc43a427f506b91c87ef3a (diff)
downloadmarkdown-rs-25e267afbc0789ea36508d45c3ea3545b84223bb.tar.gz
markdown-rs-25e267afbc0789ea36508d45c3ea3545b84223bb.tar.bz2
markdown-rs-25e267afbc0789ea36508d45c3ea3545b84223bb.zip
Add support for GFM autolink literals
Diffstat (limited to '')
-rw-r--r--examples/lib.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/lib.rs b/examples/lib.rs
index 94c2c58..62d7ee4 100644
--- a/examples/lib.rs
+++ b/examples/lib.rs
@@ -22,7 +22,19 @@ fn main() {
)
);
- // Support extensions that are not in CommonMark.
+ // Support GFM extensions.
+ println!(
+ "{}",
+ micromark_with_options(
+ "Just a link! https://example.com.",
+ &Options {
+ constructs: Constructs::gfm(),
+ ..Options::default()
+ }
+ )
+ );
+
+ // Support other extensions that are not in CommonMark.
println!(
"{:?}",
micromark_with_options(