#[derive(Debug, Clone, Copy)]
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,
}
#[allow(clippy::derivable_impls)]
impl Default for Options {
fn default() -> Self {
Self {
clean_indentations: false,
continue_inline_code: false,
continue_italic: false,
continue_bold: false,
continue_strikeout: false,
keep_code_fences: false,
}
}
}
impl Options {
pub fn clean_indentations(
mut self,
value: bool,
) -> Self {
self.clean_indentations = value;
self
}
pub fn continue_inline_code(
mut self,
value: bool,
) -> Self {
self.continue_inline_code = value;
self
}
pub fn continue_italic(
mut self,
value: bool,
) -> Self {
self.continue_italic = value;
self
}
pub fn continue_bold(
mut self,
value: bool,
) -> Self {
self.continue_bold = value;
self
}
pub fn continue_strikeout(
mut self,
value: bool,
) -> Self {
self.continue_strikeout = value;
self
}
pub fn continue_spans(
mut self,
value: bool,
) -> Self {
self.continue_inline_code = value;
self.continue_italic = value;
self.continue_bold = value;
self.continue_strikeout = value;
self
}
pub fn keep_code_fences(
mut self,
value: bool,
) -> Self {
self.keep_code_fences = value;
self
}
}