Check for existing issues
Environment
- Vale version: 3.13.1
- Operating system: macOS 25.3.0
- Installation method: Homebrew
Describe the bug / provide steps to reproduce it
When an existence rule uses scope: sentence, the IgnoredScopes = code setting is not honored for inline code spans that appear on lines where bold text (**...**) also appears inside a Markdown indented code block (4-space indent) — provided the preceding heading itself contains an inline code span.
In other words, a semicolon (or any other token) inside a backtick-wrapped inline code span is incorrectly flagged when all three conditions are met simultaneously:
- A heading with an inline code span immediately precedes the block (e.g.,
### `some.code`).
- The following content is a 4-space indented line (standard Markdown indented code block).
- That line contains bold text (
**...**) and an inline code span with the flagged token.
Minimal reproduction
styles/Test/Semicolons.yml:
extends: existence
message: "Use semicolons judiciously."
nonword: true
scope: sentence
level: suggestion
tokens:
- ';'
.vale.ini:
StylesPath = styles
MinAlertLevel = suggestion
SkippedScopes = script, style, pre, code
IgnoredScopes = tt, code, strong, b
[*.md]
BasedOnStyles = Test
test.md:
### `setup.ilm.enabled` [setup-ilm-option]
* **bold text** `inline code with semicolon;`
Run:
Expected: No output — the semicolon is inside an inline code span, which should be excluded by IgnoredScopes = code.
Actual:
test.md
3:41 suggestion Use semicolons judiciously. Test.Semicolons
Additional observations
Removing any one of the three conditions prevents the false positive:
- Removing the inline code span from the heading → no alert.
- Removing the 4-space indentation → no alert.
- Removing the bold text from the indented line → no alert.
A standalone inline code span on a non-indented line correctly produces no alert:
`inline code with semicolon;`
This suggests the bug is in how scope: sentence sentence extraction interacts with IgnoredScopes when bold markup and inline code co-occur inside indented blocks that follow a heading containing inline code.
Check for existing issues
Environment
Describe the bug / provide steps to reproduce it
When an
existencerule usesscope: sentence, theIgnoredScopes = codesetting is not honored for inline code spans that appear on lines where bold text (**...**) also appears inside a Markdown indented code block (4-space indent) — provided the preceding heading itself contains an inline code span.In other words, a semicolon (or any other token) inside a backtick-wrapped inline code span is incorrectly flagged when all three conditions are met simultaneously:
### `some.code`).**...**) and an inline code span with the flagged token.Minimal reproduction
styles/Test/Semicolons.yml:.vale.ini:test.md:Run:
Expected: No output — the semicolon is inside an inline code span, which should be excluded by
IgnoredScopes = code.Actual:
Additional observations
Removing any one of the three conditions prevents the false positive:
A standalone inline code span on a non-indented line correctly produces no alert:
This suggests the bug is in how
scope: sentencesentence extraction interacts withIgnoredScopeswhen bold markup and inline code co-occur inside indented blocks that follow a heading containing inline code.