pub struct Options {
pub clean_indentations: bool,
pub continue_inline_code: bool,
pub continue_italic: bool,
pub continue_bold: bool,
pub continue_strikeout: bool,
pub keep_code_fences: bool,
}Expand description
Markdown parsing options
Fields§
§clean_indentations: boolRemove one or several superfluous levels of indentations
This is useful when your text is too deeply intended, for example because it’s defined in a raw literal:
use minimad::*;
let text = r#"
bla bla bla
* item 1
* item 2
"#;
assert_eq!(
parse_text(text, Options { clean_indentations: true, ..Default::default() }),
Text { lines: vec![
Line::from("bla bla bla"),
Line::from("* item 1"),
Line::from("* item 2"),
]},
);continue_inline_code: bool§continue_italic: bool§continue_bold: bool§continue_strikeout: bool§keep_code_fences: boolImplementations§
Source§impl Options
impl Options
pub fn clean_indentations(self, value: bool) -> Self
pub fn continue_inline_code(self, value: bool) -> Self
pub fn continue_italic(self, value: bool) -> Self
pub fn continue_bold(self, value: bool) -> Self
pub fn continue_strikeout(self, value: bool) -> Self
pub fn continue_spans(self, value: bool) -> Self
pub fn keep_code_fences(self, value: bool) -> Self
Trait Implementations§
impl Copy for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more