module

Asciidoctor

Constants

ADMONITION_STYLE_HEADS = Set {'C', 'I', 'N', 'T', 'W'}
ADMONITION_STYLES = Set {"CAUTION", "IMPORTANT", "NOTE", "TIP", "WARNING"}
AdmonitionParagraphRx = /^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):[ \t]+/

Matches an admonition label at the start of a paragraph.

AnyListRx = /^(?:[ \t]*(?:-|\*\**|\.\..*|\x{2022}|\d+\.|[a-zA-Z]\.|[IVXivx]+\))[ \t]|(?!\/\/[^\/])[ \t]*[^ \t].*?(?::::{0,2}|;;)(?:$|[ \t])|<(?:\d+|\.)>[ \t])/

Detects the start of any list item.

ASCIIDOC_EXTENSIONS = {".ad" => true, ".adoc" => true, ".asc" => true, ".asciidoc" => true, ".txt" => true}
ATTR_REF_HEAD = '{'
AttributeEntryPassMacroRx = /\Apass:([a-z]+(?:,[a-z-]+)*)?\[(.*)\]\z/m

Matches a pass inline macro surrounding an attribute entry value.

AttributeEntryRx = /^:(!?\p{Xwd}[^:]*):(?:[ \t]+(.*))?$/

Matches a document attribute entry.

AttributeReferenceRx = /(\\)?\{(\p{Xwd}[\p{Xwd}-]*|(set|counter2?):.+?)(\\)?\}/

Matches an inline attribute reference.

AtxSectionTitleRx = /^(=={0,5})[ \t]+(.+?)(?:[ \t]+\1)?$/

Matches an Atx (single-line) section title.

AuthorDelimiterRx = /;(?: |$)/

Matches the delimiter that separates multiple authors.

AuthorInfoLineRx = /^(\p{Xwd}[\p{Xwd}\-'.]*)(?: +(\p{Xwd}[\p{Xwd}\-'.]*))?(?: +(\p{Xwd}[\p{Xwd}\-'.]*))?(?: +<([^>]+)>)?$/

Matches the author info line immediately following the document title.

BACKEND_ALIASES = {"docbook" => "docbook5", "html" => "html5"}
BASIC_SUBS = Substitution::SpecialCharacters

Pre-defined substitution groups

BlankLineRx = /\n{2,}/

Matches consecutive blank lines.

BLOCK_MATH_DELIMITERS = {"asciimath" => {"\\$", "\\$"}, "latexmath" => {"\\[", "\\]"}}
BlockAnchorRx = /^\[\[(\p{L}[\p{Xwd}\-:.]*)(?:, *(.+))?\]\]$/

Matches an anchor on a line above a block.

BlockAttributeLineRx = /^\[(?:|[\p{Xwd}.#%{,"'].*|\[(?:|\p{L}[\p{Xwd}\-:.]*(?:, *.+)?)\])\]$/

Combined pattern that matches either a block anchor or a block attribute list.

BlockAttributeListRx = /^\[(|[\p{Xwd}.#%{,"'].*)?\]$/

Matches an attribute list above a block element.

BlockMediaMacroRx = /^(image|video|audio)::(\S|\S.*?\S)\[(.+)?\]$/

Matches an image, video or audio block macro.

BlockTitleRx = /^\.(\.?[^ \t.].*)$/

Matches a title above a block.

BlockTocMacroRx = /^toc::\[(.+)?\]$/

Matches the TOC block macro.

CalloutExtractRx = /((?:\/\/|#|--|;;) ?)?(\\)?<!?(|--)(\d+|\.)(\3)>(?=(?: ?\\?<!?\3(?:\d+|\.)\3>)*$)/

Matches a callout reference inside literal text.

CalloutListRx = /^<(\d+|\.)>[ \t]+(.*)$/

Matches a callout list item.

CalloutScanRx = /\\?<!?(|--)(\d+|\.)\1>(?=(?: ?\\?<!?\1(?:\d+|\.)\1>)*$)/
CalloutSourceRx = /((?:\/\/|#|--|;;) ?)?(\\)?&lt;!?(|--)([\d]+|\.)\3&gt;(?=(?: ?\\?&lt;!?\3(?:\d+|\.)\3&gt;)*$)/m

Matches callout source markers.

CAPTION_ATTRIBUTE_NAMES = {"example" => "example-caption", "figure" => "figure-caption", "listing" => "listing-caption", "table" => "table-caption"}
CellSpecEndRx = /[ \t]+(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/
CellSpecStartRx = /^[ \t]*(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/

Parses the start and end of a cell spec (cellspec) for a table.

ColumnSpecRx = /^(?:(\d+)\*)?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?(\d+%?|~)?([a-z])?$/

Parses the column spec (colspec) for a table.

ConditionalDirectiveRx = /^(\\)?(ifdef|ifndef|ifeval|endif)::(\S*?(?:([,+])\S*?)?)\[(.+)?\]$/

Matches a conditional preprocessor directive (ifdef, ifndef, ifeval, endif).

CustomBlockMacroRx = /^(\p{Xwd}[\p{Xwd}-]*)::(|\S|\S.*?\S)\[(.+)?\]$/

Matches a custom block macro.

DEFAULT_ATTRIBUTES = {"sectids" => "", "appendix-caption" => "Appendix", "appendix-refsig" => "Appendix", "caution-caption" => "Caution", "chapter-refsig" => "Chapter", "example-caption" => "Example", "figure-caption" => "Figure", "important-caption" => "Important", "last-update-label" => "Last updated", "note-caption" => "Note", "part-refsig" => "Part", "prewrap" => "", "section-refsig" => "Section", "table-caption" => "Table", "tip-caption" => "Tip", "toc-placement" => "auto", "toc-title" => "Table of Contents", "untitled-label" => "Untitled", "version-label" => "Version", "warning-caption" => "Warning"}
DEFAULT_BACKEND = "html5"
DEFAULT_DOCTYPE = "article"
DEFAULT_EXTENSIONS = {"asciidoc" => ".adoc", "docbook" => ".xml", "epub" => ".epub", "html" => ".html", "manpage" => ".man", "pdf" => ".pdf"}
DEFAULT_PAGE_WIDTHS = {"docbook" => 425}
DEFAULT_STYLESHEET_NAME = "asciidoctor.css"
DELIMITED_BLOCK_HEADS = {"--" => true, "--" => true, ".." => true, "==" => true, "**" => true, "__" => true, "++" => true, "|=" => true, ",=" => true, ":=" => true, "!=" => true, "~~" => true, "//" => true, "``" => true}
DELIMITED_BLOCK_TAILS = {"----" => "-", "...." => ".", "====" => "=", "****" => "*", "____" => "_", "++++" => "+", "|===" => "=", ",===" => "=", ":===" => "=", "!===" => "=", "~~~~" => "~", "////" => "/"}
DELIMITED_BLOCKS = {"--" => {:open, Set {"comment", "example", "literal", "listing", "pass", "quote", "sidebar", "source", "verse", "admonition", "abstract", "partintro"}}, "----" => {:listing, Set {"literal", "source"}}, "...." => {:literal, Set {"listing", "source"}}, "====" => {:example, Set {"admonition"}}, "****" => {:sidebar, Set(String).new}, "____" => {:quote, Set {"verse"}}, "++++" => {:pass, Set {"stem", "latexmath", "asciimath"}}, "|===" => {:table, Set(String).new}, ",===" => {:table, Set(String).new}, ":===" => {:table, Set(String).new}, "!===" => {:table, Set(String).new}, "~~~~" => {:open, Set {"abstract", "partintro"}}, "////" => {:comment, Set(String).new}, "```" => {:fenced_code, Set(String).new}}
DESCRIPTION_LIST_SIBLING_RX = {"::" => /^(?!\/\/[^\/])[ \t]*([^ \t].*?[^:]|[^ \t:])(::)(?:$|[ \t]+(.*)$)/, ":::" => /^(?!\/\/[^\/])[ \t]*([^ \t].*?[^:]|[^ \t:])(:::)(?:$|[ \t]+(.*)$)/, "::::" => /^(?!\/\/[^\/])[ \t]*([^ \t].*?[^:]|[^ \t:])(::::)(?:$|[ \t]+(.*)$)/, ";;" => /^(?!\/\/[^\/])[ \t]*([^ \t].*?)(;;)(?:$|[ \t]+(.*)$)/}

Matches a sibling description list item (keyed by delimiter).

DescriptionListRx = /^(?!\/\/[^\/])[ \t]*([^ \t].*?[^:]|[^ \t:])(:::{0,2}|;;)(?:$|[ \t]+(.*)$)/

Matches a description list entry.

DescriptionListSiblingRx = {"::" => /^(?!\/\/[^\/])[ \t]*([^ \t].*?[^:]|[^ \t:])(::)(?:$|[ \t]+(.*)$)/, ":::" => /^(?!\/\/[^\/])[ \t]*([^ \t].*?[^:]|[^ \t:])(:::)(?:$|[ \t]+(.*)$)/, "::::" => /^(?!\/\/[^\/])[ \t]*([^ \t].*?[^:]|[^ \t:])(::::)(?:$|[ \t]+(.*)$)/, ";;" => /^(?!\/\/[^\/])[ \t]*([^ \t].*?)(;;)(?:$|[ \t]+(.*)$)/}

Matches a sibling description list item (excluding the delimiter specified by the key).

ESC_R_SB = "\\]"
EscapedSpaceRx = /\\([ \t\n])/

Matches whitespace escaped by a backslash.

EvalExpressionRx = /^(.+?) *([=!><]=|[><]) *(.+)$/

Matches a restricted eval expression.

ExtAtxSectionTitleRx = /^(=={0,5}|#\#{0,5})[ \t]+(.+?)(?:[ \t]+\1)?$/

Matches an extended Atx section title (includes Markdown variant).

ExtLayoutBreakRx = /^(?:'{3,}|<{3,}|([-*_])( *)\1\2\1)$/

Matches an AsciiDoc or Markdown horizontal rule or page break.

FLEXIBLE_ATTRIBUTES = ["sectnums"]
HARD_LINE_BREAK = " +"
HardLineBreakRx = /^(.*) \+$/m

Matches a trailing + preceded by at least one space (hard line break).

HEADER_SUBS = Substitution::SpecialCharacters | Substitution::Attributes
HYBRID_LAYOUT_BREAK_CHARS = {'\'' => :thematic_break, '<' => :page_break, '-' => :thematic_break, '*' => :thematic_break, '_' => :thematic_break}
IncludeDirectiveRx = /^(\\)?include::([^\s\[](?:[^\[]*[^\s\[])?)\[(.+)?\]$/

Matches an include preprocessor directive.

INLINE_MATH_DELIMITERS = {"asciimath" => {"\\$", "\\$"}, "latexmath" => {"\\(", "\\)"}}
InlineAnchorRx = /(\\)?(?:\[\[(\p{L}[\p{Xwd}\-:.]*)(?:, *(.+?))? ?\]\]|anchor:(\p{L}[\p{Xwd}\-:.]*)\[(?:\]|(.+?[^\\])\]))/

Matches an anchor in the flow of text.

InlineAnchorScanRx = /(?:^|[^\\\[])\[\[(\p{L}[\p{Xwd}\-:.]*)(?:, *(.+?))? ?\]\]|(?:^|[^\\])anchor:(\p{L}[\p{Xwd}\-:.]*)\[(?:\]|(.+?[^\\])\])/

Scans for a non-escaped anchor in the flow of text.

InlineBiblioAnchorRx = /^\[\[\[(\p{L}[\p{Xwd}\-:.]*)(?:, *(.+?))?\]\]\]/

Matches a bibliography anchor at the start of list item text.

InlineBtnMacroRx = /\\?btn:\[(.*?[^\\])\]/m

Matches a btn inline macro.

InlineEmailRx = /([\\>:\/])?\p{Xwd}(?:&amp;|[\p{Xwd}\-.%+])*@\p{Xan}[\p{Xan}_\-.]*\.[a-zA-Z]{2,5}\b/

Matches an inline e-mail address.

InlineFootnoteMacroRx = /\\?footnote(?:(ref):|:([\p{Xwd}-]+)?)\[(?:|(.*?[^\\]))\]/m

Matches an inline footnote macro.

InlineImageMacroRx = /\\?i(?:mage|con):([^:\s\[](?:[^\n\[]*[^\s\[])?)\[(|.*?[^\\])\]/m

Matches an image or icon inline macro.

InlineIndextermMacroRx = /\\?(?:(indexterm2?):\[(.*?[^\\])\]|\(\((.+?)\)\)(?!\)))/m

Matches an indexterm inline macro.

InlineKbdBtnMacroRx = /(\\)?(kbd|btn):\[(.*?[^\\])\]/m

Matches a kbd or btn inline macro.

InlineKbdMacroRx = /\\?kbd:\[(.*?[^\\])\]/m

Matches a kbd inline macro.

InlineLinkMacroRx = /\\?(?:link|(mailto)):(|[^:\s\[][^\s\[]*)\[(|.*?[^\\])\]/m

Matches a link or e-mail inline macro.

InlineLinkRx = /(^|link:|[\p{Zs}\t]|\\?&lt;()|[>\(\)\[\];"'])(\\?(?:https?|file|ftp|irc):\/\/)(?:([^\s\[\]]+)\[(|.*?[^\\])\]|\2([^\s]+?)&gt;|([^\s\[\]<]*([^\s,.?!\[\]<\)])))/m

Matches an implicit link and some of the link inline macro.

InlineMenuMacroRx = /\\?menu:(\p{Xwd}|[\p{Xwd}&][^\n\[]*[^\s\[])\[ *(?:|(.*?[^\\]))\]/m

Matches a menu inline macro.

InlineMenuRx = /\\?"([\p{Xwd}&][^"]*?[ \n]+&gt;[ \n]+[^"]*)"/

Matches an implicit menu inline macro.

InlinePassMacroRx = /(?:(?:(\\?)\[([^\[\]]+)\])?(\\{0,2})(\+\+\+?|\$\$)(.*?)\4|(\\?)pass:([a-z]+(?:,[a-z-]+)*)?\[(|.*?[^\\])\])/m

Matches several variants of the passthrough inline macro.

InlineSectionAnchorRx = /\ (\\)?\[\[(\p{L}[\p{Xwd}\-:.]*)(?:, *(.+))?\]\]$/

Matches an anchor inside a section title.

InlineStemMacroRx = /\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\[(.*?[^\\])\]/m

Matches a stem inline macro.

InlineXrefMacroRx = /\\?(?:&lt;&lt;([\p{Xwd}#\/.:{].*?)&gt;&gt;|xref:([\p{Xwd}#\/.:{].*?)\[(?:\]|(.*?[^\\])\]))/m

Matches an xref (cross-reference) inline macro.

INTRINSIC_ATTRIBUTES = {"amp" => "&", "apos" => "&#39;", "asterisk" => "*", "backslash" => "\\", "backtick" => "`", "blank" => "", "brvbar" => "&#166;", "caret" => "^", "cpp" => "C&#43;&#43;", "cxx" => "C&#43;&#43;", "deg" => "&#176;", "empty" => "", "endsb" => "]", "gt" => ">", "ldquo" => "&#8220;", "lsquo" => "&#8216;", "lt" => "<", "nbsp" => "&#160;", "plus" => "&#43;", "pp" => "&#43;&#43;", "quot" => "&#34;", "rdquo" => "&#8221;", "rsquo" => "&#8217;", "sp" => " ", "startsb" => "[", "tilde" => "~", "two-colons" => "::", "two-semicolons" => ";;", "vbar" => "|", "wj" => "&#8288;", "zwsp" => "&#8203;"}
InvalidAttributeNameCharsRx = /[^\p{Xwd}-]/

Matches invalid characters in an attribute name.

InvalidSectionIdCharsRx = /<[^>]+>|&(?:[a-z][a-z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-f][\da-f][\da-f]{0,3});|[^ \p{Xwd}\-.]+?/

Matches invalid ID characters in a section title.

LAYOUT_BREAK_CHARS = {"'" => :thematic_break, "<" => :page_break}
LeadingInlineAnchorRx = /^\[\[(\p{L}[\p{Xwd}\-:.]*)(?:, *(.+?))?\]\]/

Scans for a leading, non-escaped anchor.

LF = '\n'

The newline character used for output.

LINE_CONTINUATION = " \\"
LINE_CONTINUATION_LEGACY = " +"
LIST_CONTINUATION = "+"
LIST_CONTINUATION_PLACEHOLDER = "\u001A"
LIST_CONTINUATION_STRING = "\u0019"

Sentinel values for list continuation tracking. In Ruby, ListContinuationMarker is a Module mixed into String instances. In Crystal, we use unique sentinel strings to distinguish continuation lines.

LIST_RX_MAP = {"ulist" => UnorderedListRx, "olist" => OrderedListRx, "dlist" => DescriptionListRx, "colist" => CalloutListRx}

A Hash of regexps for lists used for dynamic access (string keys).

ListRxMap = {:ulist => UnorderedListRx, :olist => OrderedListRx, :dlist => DescriptionListRx, :colist => CalloutListRx}

A Hash of regexps for lists used for dynamic access (symbol keys).

LiteralParagraphRx = /^([ \t]+.*)$/

Matches a literal paragraph (preceded by at least one space).

MacroNameRx = /^\p{Xwd}[\p{Xwd}-]*$/

Matches the name of a macro.

ManpageNamePurposeRx = /^(.+?) +- +(.+)$/

Matches the name and purpose in the manpage doctype.

ManpageTitleVolnumRx = /^(.+?) *\( *(.+?) *\)$/

Matches the title and volnum in the manpage doctype.

MARKDOWN_THEMATIC_BREAK_CHARS = {'-' => :thematic_break, '*' => :thematic_break, '_' => :thematic_break}
MarkdownThematicBreakRx = /^ {0,3}([-*_])( *)\1\2\1$/

Matches a Markdown horizontal rule.

MAX_INT = 9007199254740991_i64

Maximum integer value for "boundless" operations.

NESTABLE_LIST_CONTEXTS = [:dlist, :olist, :ulist]
NO_SUBS = Substitution::None
NORMAL_SUBS = ((((Substitution::SpecialCharacters | Substitution::Quotes) | Substitution::Attributes) | Substitution::Replacements) | Substitution::Macros) | Substitution::PostReplacements
NULL = '\0'

The null character to use for splitting attribute values.

ORDERED_LIST_KEYWORDS = {"loweralpha" => "a", "lowerroman" => "i", "upperalpha" => "A", "upperroman" => "I"}
ORDERED_LIST_STYLES = [:arabic, :loweralpha, :lowerroman, :upperalpha, :upperroman]
OrderedListMarkerRxMap = {:arabic => /^\d+\.$/, :loweralpha => /^[a-z]\.$/, :lowerroman => /^[ivx]+\)$/, :upperalpha => /^[A-Z]\.$/, :upperroman => /^[IVX]+\)$/}

A Hash mapping ordered list styles to their marker patterns.

OrderedListRx = /^[ \t]*(\.\.*|\d+\.|[a-zA-Z]\.|[IVXivx]+\))[ \t]+(.*)$/

Matches an ordered list item.

PARAGRAPH_STYLES = Set {"abstract", "comment", "example", "listing", "literal", "normal", "open", "partintro", "pass", "quote", "sidebar", "source", "verse"}
PASS_END = "\u0097"
PASS_START = "\u0096"

Additional constants used by the Substitutors module

PassSlotRx = /#{Regex.escape(PASS_START)}(\d+)#{Regex.escape(PASS_END)}/
PLUS_CHAR = "+"
QUOTE_ATTR_LIST_RXT = "\\[([^\\[\\]]+)\\]"

Quoted text substitution pattern prefix

R_SB = "]"
REFTEXT_SUBS = (Substitution::SpecialCharacters | Substitution::Quotes) | Substitution::Replacements
ReplaceableTextRx = /[&']|--|\.\.\.|\([CRT]M?\)/

Detects if text is a possible candidate for the replacements substitution.

REPLACEMENTS = [{/\\?\(C\)/, "&#169;", :none}, {/\\?\(R\)/, "&#174;", :none}, {/\\?\(TM\)/, "&#8482;", :none}, {/(?: |\n|^|\\)--(?: |\n|$)/, "&#8201;&#8212;&#8201;", :none}, {/([\p{Xwd}])\\?--(?=[\p{Xwd}])/, "&#8212;&#8203;", :leading}, {/\\?\.\.\./, "&#8230;&#8203;", :none}, {/\\?`'/, "&#8217;", :none}, {/([\p{Xan}])\\?'(?=[\p{L}])/, "&#8217;", :leading}, {/\\?-&gt;/, "&#8594;", :none}, {/\\?=&gt;/, "&#8658;", :none}, {/\\?&lt;-/, "&#8592;", :none}, {/\\?&lt;=/, "&#8656;", :none}, {/\\?(&)amp;((?:[a-zA-Z][a-zA-Z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-fA-F][\da-fA-F][\da-fA-F]{0,3});)/, "", :bounding}]

Replacement patterns (order is significant)

RevisionInfoLineRx = /^(?:[^\d{]*(.*?),)? *(?!:)(.*?)(?: *(?!^),?: *(.*))?$/

Matches the revision info line.

RS = "\\"
SectionLevelStyleRx = /^sect\d$/

Matches an explicit section level style like sect1.

SETEXT_SECTION_LEVELS = {'=' => 0, '-' => 1, '~' => 2, '^' => 3, '+' => 4}
SetextSectionTitleRx = /^((?!\.).*?\p{Xan}.*?)$/

Matches the title only (first line) of a Setext (two-line) section title.

SpaceDelimiterRx = /([^\\])[ \t\n]+/

Matches a whitespace delimiter.

STEM_TYPE_ALIASES = {"latex" => "latexmath", "latexmath" => "latexmath", "tex" => "latexmath"}
STEM_TYPE_DEFAULT = "asciimath"
SUB_GROUPS = {:attributes => [:attributes], :macros => [:macros], :none => [] of Symbol, :normal => [:specialcharacters, :quotes, :attributes, :replacements, :macros, :post_replacements], :pass => [] of Symbol, :post_replacements => [:post_replacements], :quotes => [:quotes], :replacements => [:replacements], :specialcharacters => [:specialcharacters], :verbatim => [:specialcharacters, :callouts]}

Sub groups map symbol names to arrays of substitution symbols

SUB_HINTS = {:a => :attributes, :c => :specialcharacters, :m => :macros, :n => :normal, :p => :post_replacements, :q => :quotes, :r => :replacements, :v => :verbatim}
SUB_OPTIONS = {:block => [:specialcharacters, :quotes, :attributes, :replacements, :macros, :post_replacements, :callouts, :highlight], :inline => [:specialcharacters, :quotes, :attributes, :replacements, :macros, :post_replacements]}
SubModifierSniffRx = /[+-]/

Matches a + or - modifier in a subs list.

TAB = '\t'

Tab character.

TagDirectiveRx = /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m

Matches a trailing tag directive in an include file.

TrailingDigitsRx = /\d+$/

Matches one or more consecutive digits at the end of a line.

UnorderedListRx = /^[ \t]*(-|\*\**|\x{2022})[ \t]+(.*)$/

Matches an unordered list item.

UPSTREAM_VERSION = "2.0.26"

Version de la gem Ruby Asciidoctor utilisée comme base du portage.

UriSniffRx = /\A\p{L}[\p{Xan}.+-]+:\/{0,2}/

Detects strings that resemble URIs.

USER_HOME = ENV["HOME"]? || "."
VERBATIM_STYLES = Set {"listing", "literal", "source", "verse"}
VERBATIM_SUBS = Substitution::SpecialCharacters | Substitution::Callouts
VERSION = "2.0.26"
XmlSanitizeRx = /<[^>]+>/

Detects XML tags.

Class methods

convert(source : String, options : Hash(String, String) = {} of String => String) : String

Public: Parse the AsciiDoc source input into a Document and convert it to the specified backend format.

source - the AsciiDoc source as a String options - a Hash of options to control processing (default: {})

Returns the converted String

Source
convert_file(filename : String, options : Hash(String, String) = {} of String => String) : String

Public: Parse the contents of the AsciiDoc source file and convert it to the specified backend format.

filename - the String AsciiDoc source filename options - a Hash of options to control processing (default: {})

Returns the converted String

Source
load(source : String, options : Hash(String, String) = {} of String => String) : Document

Public: Parse the AsciiDoc source input into a Document.

Accepts input as a String.

source - the AsciiDoc source as a String options - a Hash of options to control processing (default: {})

Returns the Document

Source
load(source : String, options : Hash(String, String | Nil)) : Document

Public: Parse the AsciiDoc source input with nullable attributes.

source - the AsciiDoc source as a String options - a Hash of options with nullable values

Returns the Document

Source
load(io : IO, options : Hash(String, String) = {} of String => String) : Document

Public: Parse the AsciiDoc source input from an IO object into a Document.

io - an IO object containing AsciiDoc source options - a Hash of options to control processing (default: {})

Returns the Document

Source
load_file(filename : String, options : Hash(String, String) = {} of String => String) : Document

Public: Parse the contents of the AsciiDoc source file into a Document.

filename - the String AsciiDoc source filename options - a Hash of options to control processing (default: {})

Returns the Document

Source

Nested types