Lmml. Narrative. Syntax
(Lmml v0.1.0)
View Source
Builds the Md syntax map used by Lmml.Narrative.Parser: Md.Parser.Syntax's
Default syntax module's prose/structure categories, plus lmml's own
additions/overrides.
Two additions on top of Default:
magnet: "@"is overridden (same category, same prefix key, soMd.Parser.Syntax.merge/2replaces Default'sTwitterHandletransform with ours) to produce an:lmml_refnode instead of a Twitter link.block: "@@@"is added (a new prefix key in theblockcategory, alongside Default's```fenced-code entry) to produce an:lmml_embednode for inline embeds, withescape: falseso its content is carried through verbatim instead ofMd's default HTML-entity escaping (seeMd>= 0.12.2'sblock:escape:property).
Both live in different categories than each other, and Md's engine
compiles block clauses before magnet clauses, so a "@@@..." input
is tried against the (longer, more specific) block entry first and only
falls through to the single-"@" magnet entry when it isn't a "@@@"
sequence -- no custom dispatcher needed for this to be unambiguous.