class Luce::Document
- Luce::Document
- Reference
- Object
Overview
Maintains the context needed to parse a Markdown document
Defined in:
luce/document.crConstructors
Instance Method Summary
- #block_syntaxes : Array(BlockSyntax)
- #encode_html : Bool
- #has_custom_inline_syntaxes : Bool
- #image_link_resolver : Resolver | Nil
- #inline_syntaxes : Array(InlineSyntax)
- #link_references : Hash(String, Luce::LinkReference)
- #link_resolver : Resolver | Nil
-
#parse_inline(text : String) : Array(Node)
Parses the given inline Markdown text to a series of AST nodes.
-
#parse_lines(lines : Array(String)) : Array(Node)
Parses the given lines of Markdown to a series of AST nodes.
-
#with_default_block_syntaxes : Bool
Whether to use default block syntaxes
-
#with_default_inline_syntaxes : Bool
Whether to use default inline syntaxes.
Constructor Detail
def self.new(block_syntaxes : Array(BlockSyntax) | Nil, inline_syntaxes : Array(InlineSyntax) | Nil, extension_set : ExtensionSet | Nil, link_resolver : Resolver | Nil = nil, image_link_resolver : Resolver | Nil = nil, encode_html : Bool = true, with_default_block_syntaxes : Bool = true, with_default_inline_syntaxes : Bool = true)
#
Instance Method Detail
Parses the given inline Markdown text to a series of AST nodes.
Parses the given lines of Markdown to a series of AST nodes.
def with_default_inline_syntaxes : Bool
#
Whether to use default inline syntaxes.
Need to set both #with_default_block_syntaxes
and #encode_html
to
false
to disable all inline syntaxes including HTML encoding syntaxes.