Skip to content

fix(config): reject unknown highlighting fields#3162

Open
leno23 wants to merge 1 commit into
getzola:masterfrom
leno23:fix-highlighting-unknown-fields-3127
Open

fix(config): reject unknown highlighting fields#3162
leno23 wants to merge 1 commit into
getzola:masterfrom
leno23:fix-highlighting-unknown-fields-3127

Conversation

@leno23

@leno23 leno23 commented May 22, 2026

Copy link
Copy Markdown

Closes #3127.

What changed

  • Add deny_unknown_fields to the [markdown.highlighting] config struct so misspelled keys like extra_grammar are reported while parsing config.toml instead of being silently ignored.
  • Add a regression test for the singular extra_grammar typo from the issue.

Verification

  • cargo fmt --check
  • cargo test -p config

Risk

Low. This only tightens validation within the [markdown.highlighting] table and should surface existing typos as config errors rather than changing highlighting behavior for valid configs.

@Keats

Keats commented May 22, 2026

Copy link
Copy Markdown
Collaborator

What's the difference with #3131? And on the wrong branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing error when using extra_grammar instead of extra_grammars in highlighting configuration

2 participants