///|
/// What a parser accepts beyond the CommonMark core. The presets `commonmark`
/// and `gfm` cover the two dialects this library is asked for; the fields are
/// public so a caller can take one and drop what it does not want.
pub(all) struct Flavor {
/// Pipe tables.
tables : Bool
/// `~one~` and `~~two~~` strikethrough.
strikethrough : Bool
/// Links written bare, without angle brackets or a destination.
autolinks : Bool
/// `- [ ]` and `- [x]` list items.
task_lists : Bool
/// Escape the raw HTML tags that would change the meaning of the page.
tag_filter : Bool
/// `[^label]` references with their `[^label]:` definitions.
footnotes : Bool
/// Typographic punctuation: `"x"` and `'x'` curl towards the text they wrap,
/// `---` and `--` become an em and an en dash, and `...` becomes an ellipsis.
/// Code spans, raw HTML and destinations are left as written.
smart : Bool
/// A line ending inside a paragraph is a hard break, the way a message box
/// reads it, rather than the soft break the specification gives it.
breaks : Bool
}
///|
/// CommonMark without any of the extensions.
pub let commonmark : Flavor = {
tables: false,
strikethrough: false,
autolinks: false,
task_lists: false,
tag_filter: false,
footnotes: false,
smart: false,
breaks: false,
}
///|
/// CommonMark as GitHub reads it: tables, strikethrough, bare links, task list
/// items, the tag filter and footnotes. This is the default.
pub let gfm : Flavor = {
tables: true,
strikethrough: true,
autolinks: true,
task_lists: true,
tag_filter: true,
footnotes: true,
smart: false,
breaks: false,
}
///|
/// The preset `parse` uses when the caller does not pass one: `gfm`.
pub let flavor : Flavor = gfm