diff --git a/scripts/docshtmlcheck/README.md b/scripts/docshtmlcheck/README.md index 76f5a420637..d93cceb4504 100644 --- a/scripts/docshtmlcheck/README.md +++ b/scripts/docshtmlcheck/README.md @@ -1,8 +1,7 @@ # docshtmlcheck -`docshtmlcheck` fails CI when Markdown under `docs/` contains invalid inline -HTML that the documentation site's renderer silently drops or mangles. It runs -as `make lint/docs-html` (part of `make lint`). +`docshtmlcheck` fails CI when Markdown under `docs/` contains invalid inline HTML that the documentation site's renderer silently drops or mangles, or a table header cell with no text. +It runs as `make lint/docs-html` (part of `make lint`). ## What it catches @@ -24,8 +23,9 @@ as `make lint/docs-html` (part of `make lint`). closed and leaks its wrapper over the rest of the page. - **Empty table header cells** (`empty-table-header`). Screen readers announce a header cell with no text as an unnamed column or row. - The check covers the header row of Markdown pipe tables and every `` in raw HTML tables, after decoding entities and trimming whitespace, so ` ` and `
` are reported. - Markdown between the HTML blocks of a `` counts as its text. + The check covers the header row of Markdown pipe tables and every `` in raw HTML tables, after decoding entities and trimming whitespace, so ` `, `|   |`, and `
` are reported. + An entity inside a code span is literal text, so `` ` ` `` counts. + Markdown between the HTML blocks of a `` counts as its text, and so do an image's alt text, an autolink, and a code block. Each finding names the table by its first non-empty header. For the top-left corner of a matrix, name what the row headers hold, such as `Permission`. @@ -45,6 +45,9 @@ changes. A finding on a generated page under `docs/reference/**` also prints a note pointing at the generator source, since edits to the generated file do not persist. +The table check parses the same file a second time with goldmark's table extension. +It reads the header row of each pipe table from the parsed cells, and follows `` and `
` through the raw-HTML nodes, so a table split across several HTML blocks is checked as one and Markdown between its blocks counts toward the open cell. + ## Limitations A few gaps are accepted because no docs page hits them today: @@ -55,6 +58,7 @@ A few gaps are accepted because no docs page hits them today: - The interior of a raw-text element (`