diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib.rs | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -14,7 +14,7 @@ mod tokenizer; mod util; use crate::compiler::compile; -pub use crate::compiler::CompileOptions; +pub use crate::compiler::{LineEnding, Options}; use crate::parser::parse; /// Turn markdown into HTML. @@ -30,7 +30,7 @@ use crate::parser::parse; /// ``` #[must_use] pub fn micromark(value: &str) -> String { - micromark_with_options(value, &CompileOptions::default()) + micromark_with_options(value, &Options::default()) } /// Turn markdown into HTML, with configuration. @@ -38,17 +38,18 @@ pub fn micromark(value: &str) -> String { /// ## Examples /// /// ```rust -/// use micromark::{micromark_with_options, CompileOptions}; +/// use micromark::{micromark_with_options, Options}; /// -/// let result = micromark_with_options("<div>\n\n# Hello, world!\n\n</div>", &CompileOptions { +/// let result = micromark_with_options("<div>\n\n# Hello, world!\n\n</div>", &Options { /// allow_dangerous_html: true, /// allow_dangerous_protocol: true, +/// default_line_ending: None, /// }); /// /// assert_eq!(result, "<div>\n<h1>Hello, world!</h1>\n</div>"); /// ``` #[must_use] -pub fn micromark_with_options(value: &str, options: &CompileOptions) -> String { +pub fn micromark_with_options(value: &str, options: &Options) -> String { let (events, codes) = parse(value); compile(&events, &codes, options) } |