pub struct ComrakParseOptions {
    pub smart: bool,
    pub default_info_string: Option<String>,
    pub relaxed_tasklist_matching: bool,
}
Expand description

Options for parser functions.

Fields§

§smart: bool

Punctuation (quotes, full-stops and hyphens) are converted into ‘smart’ punctuation.

let mut options = ComrakOptions::default();
assert_eq!(markdown_to_html("'Hello,' \"world\" ...", &options),
           "<p>'Hello,' &quot;world&quot; ...</p>\n");

options.parse.smart = true;
assert_eq!(markdown_to_html("'Hello,' \"world\" ...", &options),
           "<p>‘Hello,’ “world” …</p>\n");
§default_info_string: Option<String>

The default info string for fenced code blocks.

let mut options = ComrakOptions::default();
assert_eq!(markdown_to_html("```\nfn hello();\n```\n", &options),
           "<pre><code>fn hello();\n</code></pre>\n");

options.parse.default_info_string = Some("rust".into());
assert_eq!(markdown_to_html("```\nfn hello();\n```\n", &options),
           "<pre><code class=\"language-rust\">fn hello();\n</code></pre>\n");
§relaxed_tasklist_matching: bool

Whether or not a simple x or X is used for tasklist or any other symbol is allowed.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.