Skip to content

Fix highlight overlay lookup for namespaced XPath pages#708

Open
clehene wants to merge 1 commit intoobsidianmd:mainfrom
clehene:codex/fix-707-nlab-xpath
Open

Fix highlight overlay lookup for namespaced XPath pages#708
clehene wants to merge 1 commit intoobsidianmd:mainfrom
clehene:codex/fix-707-nlab-xpath

Conversation

@clehene
Copy link
Copy Markdown

@clehene clehene commented Feb 26, 2026

Summary

Add a namespace-agnostic XPath fallback when resolving stored highlight targets.

Why

Some pages (like nLab) contain namespaced XHTML subtrees where plain tag-step XPath evaluation misses nodes, so highlights are saved but overlays never render.

Changes

  • Keep current direct document.evaluate() lookup first.
  • Add fallback conversion of tag/index steps to local-name() based steps and retry lookup.

Fixes #707

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.

Highlighter overlays fail to render on nLab due to namespaced XPath lookup

1 participant