Skip to main content

Module html_block

Module html_block 

Source
Expand description

Shared HTML block-start classification.

A line whose first tag names one of these elements starts an HTML block in rumdl’s parser (lint_context::heading_detection::detect_html_blocks). Reflow consults the same predicate so a wrapped line can never introduce a construct the parser would classify differently: the two must agree, and sharing the list keeps them from drifting apart.

Constants§

BLOCK_ELEMENTS
HTML elements whose tags open an HTML block at line start (CommonMark type-1 and type-6 conditions, as recognized by rumdl’s parser).
TYPE_1_BLOCK_ELEMENTS
Type-1 tags per CommonMark: blank lines inside these blocks do not terminate them — only a matching end tag (or EOF) does.

Functions§

parse_html_block_start
If trimmed (a line with leading whitespace already stripped) opens an HTML block per rumdl’s parser, return the lowercased tag name and whether it is a closing tag. Returns None for text, autolinks, and inline-level tags (<span>, <b>, …), which cannot interrupt a paragraph.