Skip to content

A wikilink inside inline code is indexed as a real link #25

Description

@wiverson

Found while feeding the indexer awkward content on 2026-08-06. Minor; not fixed.

Tags and links disagree about inline code:

Use `#include <stdio.h>` in C.      → not tagged
A literal `[[wikilink]]` in code.   → indexed as a link

The tag rule requires whitespace before the #, and a backtick is not whitespace — so inline code is spared, though by accident rather than by design. The wikilink pattern has no such requirement, so it matches inside backticks.

Effect: a note about Obsidian syntax invents links that then show up in list_link_issues as unresolved, and pollutes get_links. Exactly the "someone keeps study notes about the tool" case.

Fix: strip inline code spans before extracting links (and tags, so the two agree deliberately rather than coincidentally). Worth checking against Obsidian's own behaviour first — it does not linkify inside code spans, so matching it is the goal.

Recorded in hostile-content.test.ts, which asserts the current behaviour so a change is a decision rather than a surprise.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions