Expand description
Frequently used markdown extensions and stuff from GFM.
- strikethrough (~~xxx~~~)
- tables
- linkify (convert http://example.com to a link)
- beautify links (cut “http://” from links and shorten paths)
- smartquotes and typographer
- code block highlighting using
syntect
let md = &mut markdown_that::MarkdownThat::new();
markdown_that::plugins::cmark::add(md);
markdown_that::plugins::extra::add(md);
let html = md.parse("hello ~~world~~").render();
assert_eq!(html.trim(), r#"<p>hello <s>world</s></p>"#);
let html = md.parse(r#"Markdown done "The Right Way(TM)""#).render();
assert_eq!(html.trim(), r#"<p>Markdown done “The Right Way™”</p>"#);
Modules§
- beautify_
links - Pretty-print all urls and fit them into N characters
- heading_
anchors - Add id attribute (slug) to headings.
- linkify
- Find urls and emails, and turn them into links
- smartquotes
- Replaces
"
and'
quotes with “nicer” ones like‘
,’
,“
,”
, or with’
for words like “isn’t”. - strikethrough
- Strikethrough syntax (like
~~this~~
) - syntect
- Syntax highlighting for code blocks
- tables
- GFM tables
- typographer
- Common textual replacements for dashes, ©, ™, …