Documentation
¶
Overview ¶
Command docshtmlcheck fails when Markdown files under docs/ contain invalid inline HTML that the documentation site's HTML renderer silently drops or mangles.
It exists to prevent regressions of two classes of bug that were fixed by a manual audit of the docs:
- Swallowed angle-bracket placeholders. An unwrapped placeholder such as <region> or <server>__ is parsed as an unknown HTML tag and stripped from the rendered page, so readers see broken text. Placeholders must be wrapped in backticks (see contributing/documentation.md). This also covers CLI --help strings and Swagger annotations, whose text is generated into docs/reference/**.
- Structurally invalid or unregistered HTML: end tags for void elements (</br>); tag names outside the standard HTML5 element set; capitalized tags such as <Image> or <Table>, which the docs renderer reads as component references and drops when unregistered (only <children> is registered); and unclosed container tags (a <div class="tabs"> that is never closed and leaks its wrapper over the rest of the page).
Detection is Markdown-aware: the file is parsed with goldmark and only raw HTML nodes are inspected, so angle brackets inside fenced code blocks, inline code spans, HTML comments, and <https://...> or <user@host> autolinks are ignored.
Known limitations (accepted; no docs page hits either today): a placeholder whose name is itself a real element (<input>, <time>) is indistinguishable from intended markup and passes; and the interior of a raw-text element (<script>, <style>) is one opaque text token to the tokenizer, so a tag nested inside is not scanned, though an unclosed <script>/<style> is still caught.
Usage:
docshtmlcheck [path ...]
With no arguments it scans docs/. Arguments may be files or directories.