Skip to content

fix(markdown): parse escaped wikilink aliases - #3772

Open
zagushka wants to merge 1 commit into
Graphify-Labs:v8from
zagushka:codex/fix-escaped-wikilink-alias
Open

zagushka wants to merge 1 commit into
Graphify-Labs:v8from
zagushka:codex/fix-escaped-wikilink-alias

Conversation

@zagushka

@zagushka zagushka commented Sep 23, 2026 •

Copy link
Copy Markdown

What does this PR do?

Obsidian requires an escaped alias separator inside Markdown tables:

[[notes/Target\|Alias]]

The Markdown wikilink regex currently consumes the backslash as part of the target. The extractor then looks for notes/Target\.md, so it cannot stamp the real target_file. This can leave the direct and incremental extraction paths without the canonical target path.

This change accepts both | and \| as alias separators. It adds a regression test that requires both forms to resolve to the same existing Markdown file.

Related to #295. This focused parser fix does not close that broader structural-extraction issue.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Tests or CI
  • Refactor
  • Security fix

How was this tested?

uv run --frozen pytest tests/ -q --tb=short
5937 passed, 14 skipped

uv run --frozen pytest tests/test_languages.py -q
396 passed, 20 skipped

uv run --frozen ruff check graphify/extractors/markdown.py tests/test_languages.py
All checks passed!

Graphify-specific checklist

  • I added or updated tests for behavior changes.
  • I updated documentation or confirmed that no documentation is needed.
  • I updated generated skill artifacts when changing their source fragments. (Not applicable: no skill source changed.)
  • I considered compatibility across supported Python versions.
  • I confirmed that no API keys, generated graph data, or local-only files are included.

@zagushka
zagushka marked this pull request as ready for review September 23, 2026 00:11

This branch has not been deployed

No deployments
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