enum Cmark::Option

Overview

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

Options affecting rendering:

Options affecting parsing:

You can easily combine options like this:

options = Option.flags(Unsafe, Nobreaks, ValidateUTF8, Smart)

Defined in:

cmark/option.cr

Enum 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.

None = 0
All = 261654

Instance Method Summary

Instance Method Detail

def footnotes? #

def full_info_string? #

def github_pre_lang? #

def hardbreaks? #

def liberal_html_tag? #

def nobreaks? #

def none? #

def smart? #

def sourcepos? #

def strikethrough_double_tilde? #

def table_prefer_style_attributes? #

def unsafe? #

def validate_utf8? #