Inline-position gate for [[html]]...[[/html]] when the parser is
configured with allowHtmlBlocks: false.
The block-level htmlBlockRule already removes [[html]] blocks
that sit at the start of a line, but the block dispatcher never
reaches a [[html]] that appears mid-paragraph. Without this inline
rule, the body of a disabled-but-inline-positioned [[html]] would
end up parsed as paragraph text and leak into the output as escaped
HTML.
When enabled (allowHtmlBlocks !== false), the rule does nothing
(returns success: false) so the existing paragraph behaviour is
preserved: a stray inline [[html]] renders as text. The block-level
rule handles the proper case where [[html]] is on its own line.
When disabled (allowHtmlBlocks === false):
A well-formed [[html ...]]...[[/html]] is fully consumed and
produces no AST element, emitting an html-block-disabled info
diagnostic.
An unclosed [[html ...]] is consumed to the end of the token
stream so the body cannot leak as inline text, emitting both
unclosed-block (warning) and html-block-disabled (info).
Inline-position gate for
[[html]]...[[/html]]when the parser is configured withallowHtmlBlocks: false.The block-level htmlBlockRule already removes
[[html]]blocks that sit at the start of a line, but the block dispatcher never reaches a[[html]]that appears mid-paragraph. Without this inline rule, the body of a disabled-but-inline-positioned[[html]]would end up parsed as paragraph text and leak into the output as escaped HTML.When enabled (
allowHtmlBlocks !== false), the rule does nothing (returnssuccess: false) so the existing paragraph behaviour is preserved: a stray inline[[html]]renders as text. The block-level rule handles the proper case where[[html]]is on its own line.When disabled (
allowHtmlBlocks === false):[[html ...]]...[[/html]]is fully consumed and produces no AST element, emitting anhtml-block-disabledinfo diagnostic.[[html ...]]is consumed to the end of the token stream so the body cannot leak as inline text, emitting bothunclosed-block(warning) andhtml-block-disabled(info).