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
//! Raw html syntax (block and inline), part of CommonMark standard.
//!
//! This feature is separated from cmark because it is unsafe to enable by
//! default (due to lack of any kind of html sanitization).
//!
//! You can enable it if you're:
//!  - looking for strict CommonMark compatibility
//!  - only have trusted input (i.e. writing markdown yourself)
//!  - or took some care to sanitize html yourself
//!
//! ```rust
//! let md = &mut markdown_it::MarkdownIt::new();
//! markdown_it::plugins::cmark::add(md);
//! markdown_it::plugins::html::add(md);
//!
//! let html = md.parse("hello<br>world").render();
//! assert_eq!(html.trim(), r#"<p>hello<br>world</p>"#);
//! ```

pub mod html_block;
pub mod html_inline;
mod utils;

use crate::MarkdownIt;

pub fn add(md: &mut MarkdownIt) {
    html_inline::add(md);
    html_block::add(md);
}