Skip to content

fix: ignore wiki links inside inline code spans - #492

Open
zacharywomack8-source wants to merge 1 commit into
Feel-ix-343:mainfrom
zacharywomack8-source:fix-wiki-refs-in-inline-code
Open

fix: ignore wiki links inside inline code spans#492
zacharywomack8-source wants to merge 1 commit into
Feel-ix-343:mainfrom
zacharywomack8-source:fix-wiki-refs-in-inline-code

Conversation

@zacharywomack8-source

Copy link
Copy Markdown

Fixes #269

\[[\\ and \]]\\ inside inline code spans are falsely reported as unresolved references. The wiki-link regex matches them as a single reference spanning two separate inline code spans, and the existing filter only dropped references fully contained in one code block.

This changes the reference filter to drop any reference that overlaps a code block (fenced or inline) when
eferences_in_codeblocks\ is disabled, via a new \Rangeable::overlaps\ helper.

Verified:

  • \cargo build\ clean
  • \cargo test: 79 passed, 0 failed
  • \cargo fmt --check\ clean
  • new regression tests: \wiki_links_in_inline_code_are_not_references, \wiki_links_outside_code_are_still_references\

/claim #269
Generated by Agent Core

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.

Unresolved reference when using [[ and ]]

1 participant