Skip to content

Ignore wikilinks that overlap inline code spans#461

Open
6crucified wants to merge 1 commit into
Feel-ix-343:mainfrom
6crucified:fix-inline-code-wikilink-269
Open

Ignore wikilinks that overlap inline code spans#461
6crucified wants to merge 1 commit into
Feel-ix-343:mainfrom
6crucified:fix-inline-code-wikilink-269

Conversation

@6crucified

Copy link
Copy Markdown

/claim #269

Summary

  • treat code spans and fenced code blocks as exclusions for any reference that overlaps them, not only references fully contained inside one code block
  • add a regression test for the reported `[[` ... `]]` inline-code false positive
  • add a control test showing a real wikilink outside inline code still parses normally

Why

The current wikilink regex can span from `[[` in one inline code span to `]]` in another. That produces a false unresolved reference because the match overlaps multiple code spans and is not filtered out by the existing containment check.

Validation

  • cargo fmt --check
  • git diff --check -- src/vault/mod.rs

Note: I attempted to run a focused cargo test for the new regression locally, but the first full test-binary build for this repo was unusually slow in this environment and did not complete within the time budget.

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.

1 participant