The Constructs struct allows you to control which markdown syntax elements are enabled during parsing. Note that some constructs, like blank lines and paragraphs, cannot be disabled.
You can use predefined configurations:
Constructs::default(): Provides CommonMark constructs.Constructs::gfm(): Provides GitHub Flavored Markdown (GFM) constructs.Constructs::mdx(): Provides MDX constructs (turns on MDX, turns off conflicting autolink, code_indented, and html constructs).
You can also create custom configurations by mixing and matching fields using struct update syntax.
use markdown::Constructs;
// Use the default trait to get `CommonMark` constructs:
let commonmark = Constructs::default();
// To turn on all of GFM, use the `gfm` method:
let gfm = Constructs::gfm();
// Or, mix and match:
let custom = Constructs {
math_flow: true,
math_text: true,
..Constructs::gfm()
};