abstract class Luce::BlockSyntax
- Luce::BlockSyntax
- Reference
- Object
Direct Known Subclasses
- Luce::AlertBlockSyntax
- Luce::BlockquoteSyntax
- Luce::CodeBlockSyntax
- Luce::DummyBlockSyntax
- Luce::EmptyBlockSyntax
- Luce::FencedBlockquoteSyntax
- Luce::FencedCodeBlockSyntax
- Luce::FootnoteDefSyntax
- Luce::HeaderSyntax
- Luce::HorizontalRuleSyntax
- Luce::HTMLBlockSyntax
- Luce::LinkReferenceDefinitionSyntax
- Luce::ListSyntax
- Luce::ParagraphSyntax
- Luce::SetextHeaderSyntax
- Luce::TableSyntax
Defined in:
luce/block_syntaxes/block_syntax.crClass Method Summary
-
.at_block_end?(parser : BlockParser) : Bool
Return whether or not parser's current line should end the previous block
-
.generate_anchor_hash(element : Element) : String
Generates a valid HTML anchor from the inner text of element.
Instance Method Summary
- #can_end_block?(parser : BlockParser) : Bool
- #can_parse?(parser : BlockParser) : Bool
-
#interrupted_by(parser : BlockParser) : BlockSyntax | Nil
Returns the block which interrupts current syntax parsing if there is one, otherwise returns
nil. - #parse(parser : BlockParser) : Node | Nil
- #parse_child_lines(parser : BlockParser) : Array(Line | Nil)
-
#pattern : Regex
Return the regex used to identify the beginning of this block, if any.
Class Method Detail
def self.at_block_end?(parser : BlockParser) : Bool
#
Return whether or not parser's current line should end the previous block
Generates a valid HTML anchor from the inner text of element.
Instance Method Detail
Returns the block which interrupts current syntax parsing if there is one,
otherwise returns nil.
Make sure to check if parser#done? is false first.