enum

Cmark::Option

Inherits Enum < Comparable < Value < Object

A flag enum for rendering and parsing options, with None being the default.

Options affecting rendering:

  • Sourcepos
  • Hardbreaks
  • Unsafe
  • Nobreaks

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)

Constants

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.

None = 0
All = 261654

Instance methods

footnotes?

Returns true if this enum value contains Footnotes

Source
full_info_string?

Returns true if this enum value contains FullInfoString

Source
github_pre_lang?

Returns true if this enum value contains GithubPreLang

Source
hardbreaks?

Returns true if this enum value contains Hardbreaks

Source
liberal_html_tag?

Returns true if this enum value contains LiberalHTMLTag

Source
nobreaks?

Returns true if this enum value contains Nobreaks

Source
none?
Source
smart?

Returns true if this enum value contains Smart

Source
sourcepos?

Returns true if this enum value contains Sourcepos

Source
strikethrough_double_tilde?

Returns true if this enum value contains StrikethroughDoubleTilde

Source
table_prefer_style_attributes?

Returns true if this enum value contains TablePreferStyleAttributes

Source
unsafe?

Returns true if this enum value contains Unsafe

Source
validate_utf8?

Returns true if this enum value contains ValidateUTF8

Source