#[derive(Debug)]
pub struct Options {
pub heading_style: HeadingStyle,
pub hr_style: HrStyle,
pub br_style: BrStyle,
pub link_style: LinkStyle,
pub link_reference_style: LinkReferenceStyle,
pub code_block_style: CodeBlockStyle,
pub code_block_fence: CodeBlockFence,
pub bullet_list_marker: BulletListMarker,
pub ul_bullet_spacing: u8,
pub ol_number_spacing: u8,
pub preformatted_code: bool,
pub translation_mode: TranslationMode,
}
impl Default for Options {
fn default() -> Self {
Self {
heading_style: HeadingStyle::Atx,
hr_style: HrStyle::Asterisks,
br_style: BrStyle::TwoSpaces,
link_style: LinkStyle::Inlined,
link_reference_style: LinkReferenceStyle::Full,
code_block_style: CodeBlockStyle::Fenced,
code_block_fence: CodeBlockFence::Backticks,
bullet_list_marker: BulletListMarker::Asterisk,
ul_bullet_spacing: 3,
ol_number_spacing: 2,
preformatted_code: false,
translation_mode: TranslationMode::Pure,
}
}
}
#[derive(PartialEq, Debug, Clone, Copy)]
pub enum HeadingStyle {
Atx,
Setex,
}
#[derive(PartialEq, Debug, Clone, Copy)]
pub enum HrStyle {
Dashes,
Asterisks,
Underscores,
}
#[derive(PartialEq, Debug, Clone, Copy)]
pub enum BrStyle {
TwoSpaces,
Backslash,
}
#[derive(PartialEq, Debug, Clone, Copy)]
pub enum CodeBlockStyle {
Indented,
Fenced,
}
#[derive(PartialEq, Debug, Clone, Copy)]
pub enum CodeBlockFence {
Tildes,
Backticks,
}
#[derive(PartialEq, Debug, Clone, Copy)]
pub enum BulletListMarker {
Asterisk,
Dash,
}
#[derive(PartialEq, Debug, Clone, Copy)]
pub enum LinkStyle {
Inlined,
InlinedPreferAutolinks,
Referenced,
}
#[derive(PartialEq, Debug, Clone, Copy)]
pub enum LinkReferenceStyle {
Full,
Collapsed,
Shortcut,
}
#[derive(PartialEq, Debug, Clone, Copy)]
pub enum TranslationMode {
Pure,
Faithful,
}