enum Cmark::Option
Overview
A flag enum for rendering and parsing options, with None
being the default.
Options affecting rendering:
Options affecting parsing:
ValidateUTF8
Smart
GithubPreLang
LiberalHTMLTag
Footnotes
StrikethroughDoubleTilde
TablePreferStyleAttributes
FullInfoString
You can easily combine options like this:
options = Option.flags(Unsafe, Nobreaks, ValidateUTF8, Smart)
Defined in:
cmark/option.crEnum Members
-
Sourcepos =
2
-
Include a 'data-sourcepos' attribute on all block elements.
-
Hardbreaks =
4
-
Render 'softbreak' elements as hard line breaks.
-
Unsafe =
131072
-
Render raw HTML and unsafe links.
It applies to 'javascript', 'vbscript', 'file', and 'data', except for 'image/png', 'image/gif', 'image/jpeg', or 'image/webp' mime types.
By default, raw HTML is replaced by a placeholder HTML comment. Unsafe links are replaced by empty strings.
-
Nobreaks =
16
-
Render 'softbreak' elements as spaces.
-
ValidateUTF8 =
512
-
Validate UTF-8 in the input before parsing, replacing illegal sequences with the replacement character U+FFFD.
-
Smart =
1024
-
Convert straight quotes to curly, --- to em dashes, -- to en dashes.
-
GithubPreLang =
2048
-
Use GitHub-style '
' tags for code blocks instead of '
'.
-
LiberalHTMLTag =
4096
-
Be liberal in interpreting inline HTML tags.
-
Footnotes =
8192
-
Parse footnotes.
-
StrikethroughDoubleTilde =
16384
-
Only parse strikethroughs if surrounded by exactly 2 tildes.
-
TablePreferStyleAttributes =
32768
-
Use style attributes to align table cells instead of align attributes.
-
FullInfoString =
65536
-
Include the remainder of the info string in code blocks in a separate attribute.
Instance Method Summary
-
#footnotes?
-
#full_info_string?
-
#github_pre_lang?
-
#hardbreaks?
-
#liberal_html_tag?
-
#nobreaks?
-
#none?
-
#smart?
-
#sourcepos?
-
#strikethrough_double_tilde?
-
#table_prefer_style_attributes?
-
#unsafe?
-
#validate_utf8?
Instance Method Detail