Skip to content

fix: Exempt math braces from inline attribute linter#354

Merged
mcanouil merged 2 commits into
mainfrom
fix/353-equation-linter-false-positive
Jun 14, 2026
Merged

fix: Exempt math braces from inline attribute linter#354
mcanouil merged 2 commits into
mainfrom
fix/353-equation-linter-false-positive

Conversation

@mcanouil

Copy link
Copy Markdown
Owner

The inline attribute diagnostics treated any {...} brace as a Pandoc attribute block, so LaTeX math such as \text{X = Y} triggered a false "Remove spaces around =" warning.

Element brace matches are now gated with isPandocAttributeContext, so the diagnostics only run when the brace opens a genuine attribute context (span, link/image, code, div, header). Braces in math and other non-attribute positions are skipped.

Closes #353

mcanouil added 2 commits June 14, 2026 11:47
The inline attribute diagnostics treated any {...} brace as a Pandoc
attribute block, so LaTeX math such as \text{X = Y} triggered a false
"Remove spaces around =" warning.

Gate element brace matches with isPandocAttributeContext so only genuine
attribute contexts (span, link/image, code, div, header) are linted.

Closes #353
@mcanouil mcanouil added the Type: Bug 🐛 Issues related to bugs, errors, or mistakes label Jun 14, 2026
@mcanouil mcanouil self-assigned this Jun 14, 2026
@mcanouil mcanouil merged commit 8cc4e49 into main Jun 14, 2026
7 checks passed
@mcanouil mcanouil deleted the fix/353-equation-linter-false-positive branch June 14, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug 🐛 Issues related to bugs, errors, or mistakes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positive linter in equations

1 participant