mirror of
https://github.com/Ar9av/obsidian-wiki.git
synced 2026-09-14 20:36:34 +08:00
f268d43744
* fix(lint): stop flagging embeds and normalise .md/escaped-pipe wikilink targets broken_links harvests every [[wikilink]] target, including embeds (![[diagram.png]], [[board.canvas]], [[dashboard.base]]) that by_slug can never hold since _iter_pages globs only *.md. An explicit .md suffix ([[alpha.md]]) and a table-escaped pipe ([[beta\|B]]) were also compared raw against the slugged index instead of being normalised the way _normalise_node_id already normalises a page's own id, so both never resolved either. _wikilink_page_target() returns None for a non-.md-extension target (skipping attachment embeds) and otherwise strips an explicit .md suffix and a trailing backslash before _parse_page slugs it. On the issue's own repro vault this drops broken_links from 7 flagged (6 false positives) to the one genuinely broken link. Fixes #176 * fix(lint): only skip attachment extensions, not every dotted page name Path("Node.js").suffix is ".js", so the previous `if suffix: return None` dropped links to any page whose name contains a dot. Those links feed orphan detection and link_count as well as broken_links, so "Node.js", "Next.js", "v1.2 release notes" and friends were reported as orphans. Skip only Obsidian's attachment extensions instead. --------- Co-authored-by: ar9av <ar9avg@gmail.com>
743 B
743 B