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.

Instance Method Summary

Instance Method Detail

def footnotes? #

[View source]
def full_info_string? #

[View source]
def github_pre_lang? #

[View source]
def hardbreaks? #

[View source]
def liberal_html_tag? #

[View source]
def nobreaks? #

[View source]
def none? #

[View source]
def smart? #

[View source]
def sourcepos? #

[View source]
def strikethrough_double_tilde? #

[View source]
def table_prefer_style_attributes? #

[View source]
def unsafe? #

[View source]
def validate_utf8? #

[View source]