commonmark.js
commonmark.js copied to clipboard
Support _htmlBlockType for html_inline.
Add support for the _htmlBlockType property on inline HTML elements; this allows AST consumers to be able to know ahead of time the type for inline HTML elements which is useful when parsing processing instructions or comments.
Moved the reHtmlBlockOpen RegExp to the common module so that it may be shared between the inline and block parsers.
Benchmarks were stable for me after adding this but I'm not sure which sample to use for lots of inline HTML elements.
@jgm any chance for this PR to be merged ? (once fixed, obviously)