class Luce::FencedCodeBlockSyntax

Overview

Parses preformatted code blocks between two ~~~ or ``` sequences.

See the CommonMark spec: https://spec.commonmark.org/0.30/#fenced-code-blocks

Defined in:

luce/block_syntaxes/fenced_code_block_syntax.cr

Instance Method Summary

Instance methods inherited from class Luce::BlockSyntax

can_end_block?(parser : BlockParser) : Bool can_end_block?, can_parse?(parser : BlockParser) : Bool can_parse?, interrupted_by(parser : BlockParser) : BlockSyntax | Nil interrupted_by, parse(parser : BlockParser) : Node | Nil parse, parse_child_lines(parser : BlockParser) : Array(Line | Nil) parse_child_lines, pattern : Regex pattern

Class methods inherited from class Luce::BlockSyntax

at_block_end?(parser : BlockParser) : Bool at_block_end?, generate_anchor_hash(element : Element) : String generate_anchor_hash

Instance Method Detail

def parse(parser : BlockParser) : Node #

def parse_child_lines(parser : BlockParser, opening_marker : String = "", indent : Int32 = 0) : Array(Line) #

def pattern : Regex #
Description copied from class Luce::BlockSyntax

Return the regex used to identify the beginning of this block, if any.