Enable MD033 in the canonical markdownlint config (flag inline HTML elements) - #378
Merged
Conversation
…lements) MD033 was disabled with the rationale that inline HTML is used for reference-link section dividers. Those dividers are HTML comments, and MD033 does not flag comments - only elements. So the disable never served the dividers. It only ever permitted inline HTML elements, which are unwanted where markdown has a native equivalent. The hub uses zero such elements, so enabling MD033 is a no-op today that keeps native markdown enforced going forward. Backtick the placeholder tokens in reports/_template.md (matching the existing `<sha>`) so MD033 does not misread `<repo>`/`<n>`/`<defect>` as elements; they read better as code spans regardless. Also recast a semicolon in the config comment. Verified: 0 markdownlint errors across the hub with MD033 enforcing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens the repo's canonical Markdown linting by re-enabling MD033 (inline HTML) in the shared markdownlint config, ensuring inline HTML elements are flagged while HTML comments remain permitted. It also updates the audit report template so placeholder tokens like <repo> are rendered as code spans and no longer risk being interpreted as HTML tags under MD033.
Changes:
- Remove the explicit
"MD033": falseoverride from.markdownlint-cli2.jsoncand document why MD033 should remain enabled. - Update
reports/_template.mdto wrap<...>placeholder tokens in backticks so they are treated as code spans, not HTML tags.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.markdownlint-cli2.jsonc |
Stops disabling MD033 and documents the rationale so inline HTML elements remain linted. |
reports/_template.md |
Wrapes <...> placeholders in code spans to avoid MD033 false positives and improve readability. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Surfaced during the Financial-Modeling fidelity adoption.
Why
"MD033": falsewas disabled to permit "inline HTML for reference-link section dividers". But those dividers are HTML comments (<!-- Repo -->), and MD033 does not flag comments — only elements (verified empirically: a comment passes,<br>/<span>are flagged). So the disable never served the dividers; it only ever permitted inline HTML elements, which are unwanted where markdown has a native equivalent.The hub uses zero real HTML elements, so enabling MD033 is a no-op today that keeps native markdown enforced from here on.
Changes
.markdownlint-cli2.jsonc— remove"MD033": false; document why it stays enabled so it isn't re-added. Recast a pre-existing semicolon in the config comment.reports/_template.md— backtick the<...>placeholder tokens (matching the existing`<sha>`) so MD033 doesn't misread<repo>/<n>/<defect>as elements. They read better as code spans anyway.Verification
markdownlint-cli2 "**/*.md"→ 0 errors across the hub with MD033 enforcing.Note:
.markdownlint-cli2.jsoncis a verbatim fleet unit, so bumping the canonical will surface downstreams still on the old config as verbatim stale (re-vendor) — the fidelity engine working as designed.🤖 Generated with Claude Code