1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! 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`
//!
//! ```rust
//! let md = &mut markdown_it::MarkdownIt::new();
//! markdown_it::plugins::cmark::add(md);
//! markdown_it::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>"#);
//! ```
use crateMarkdownIt;