name: unbalanced-backtick default: true advisory: false fix: false since: 0.1.0
unbalanced-backtick
Backtick in prose that could not be paired with a closing fence.
What it does
Flags inline code spans whose backtick fence was not closed before the end of a paragraph or the
end of the document, e.g. `foo with no matching `.
Why
CommonMark's inline code rule requires the same number of opening and closing backticks. An unclosed opener silently turns the rest of the paragraph into prose (it is not rendered as a code span), so the visual result drifts from what the author meant. Worse, the unclosed run often eats markup intended for later constructs (links, emphasis), producing a cascade of silently broken rendering.
Example (bad)
Run `cargo build to compile.
Example (good)
Run `cargo build` to compile.
Configuration
- Disable inline:
<!-- mdwright: allow unbalanced-backtick -->. - Disable in config:
[lint] ignore = ["unbalanced-backtick"]. - Severity: non-advisory.