class

Luce::DecodeHtmlSyntax

Inherits Luce::InlineSyntax < Reference < Object

Decodes numeric character references, for example decode &#35; to #.

<!-- https://spec.commonmark.org/0.30/#entity-and-numeric-character-references -->

Constructors

new

Instance methods

matches?(parser : InlineParser, start_match_pos : Int32 | Nil = nil) : Bool

Tries to match at the parser's current position.

The parser's position can be overriden with start_match_pos. Return whether or not the pattern successfully matched.

on_match(parser : InlineParser, match : Regex::MatchData) : Bool

Processes match, adding nodes to parser and possibly advancing parser.

Will return whether the caller should advance parser by match[0].size.