| 1 | //! Basic markdown syntax, you probably want to add this. |
| 2 | //! |
| 3 | //! This is full implementation of [CommonMark](https://spec.commonmark.org/0.30/) |
| 4 | //! standard (with the exception of HTML inlines/blocks which are moved to separate |
| 5 | //! [plugin](crate::plugins::html) for security reasons). |
| 6 | //! |
| 7 | //! [cmark::add](self::add) function adds all features at once. If you only want |
| 8 | //! to enable some of it (e.g. disable images), you can add each syntax one by one |
| 9 | //! by invoking `add` function of the respective module. |
| 10 | pub mod block; |
| 11 | pub mod inline; |
| 12 | |
| 13 | use crate::MarkdownIt; |
| 14 | |
| 15 | pub fn add(md: &mut MarkdownIt) { |
| 16 | inline::newline::add(md); |
| 17 | inline::escape::add(md); |
| 18 | inline::backticks::add(md); |
| 19 | inline::emphasis::add(md); |
| 20 | inline::link::add(md); |
| 21 | inline::image::add(md); |
| 22 | inline::autolink::add(md); |
| 23 | inline::entity::add(md); |
| 24 | |
| 25 | block::code::add(md); |
| 26 | block::fence::add(md); |
| 27 | block::blockquote::add(md); |
| 28 | block::hr::add(md); |
| 29 | block::list::add(md); |
| 30 | block::reference::add(md); |
| 31 | block::heading::add(md); |
| 32 | block::lheading::add(md); |
| 33 | block::paragraph::add(md); |
| 34 | } |