Repository navigation
0.4.1: any URI scheme is an external link, not a fixed list - #15
Open
emircanerol wants to merge 1 commit into
Open
emircanerol wants to merge 1 commit into
emircanerol wants to merge 1 commit into
Conversation
The lint skipped only http, https, mailto, obsidian, file, ftp and tel targets and read every other link as a relative path, so app links such as zotero://select/... and zotero://open-pdf/... in paper notes were reported as broken markdown links. - vault_lint.py: EXTERNAL prefix tuple replaced by URI_SCHEME_RE (RFC 3986 scheme: a letter, then letters, digits, + . -, then a colon). Two characters at least, so a Windows drive path (C:/x.md, C:\x.md) is still checked as a path. - test_vault_lint.py: case 14 (zotero://, vscode://, doi:, a reference definition; a C:/ path still reported broken). - CHANGELOG C-20261108-1; both plugin.json files 0.4.1; ai-docs/log.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
vault_lint.pyskipped only a fixed list of link prefixes (http://,https://,mailto:,obsidian://,file://,ftp://,tel:) and read every other target as a relative path. Paper notes linked to their Zotero items, e.g.were therefore reported as broken markdown links. The same applies to
vscode://,doi:and any other app scheme.Change
scripts/vault_lint.py: theEXTERNALtuple is replaced byURI_SCHEME_RE = r"[A-Za-z][A-Za-z0-9+.-]+:"(an RFC 3986 scheme). The scheme must be at least two characters, so a Windows drive path (C:/x.md,C:\x.md) is still checked as a path.scripts/test_vault_lint.py: case 14 coverszotero://select,zotero://open-pdf,vscode://,doi:, and a reference-style definition, and checks that aC:/path is still reported as broken. Both checks fail on the old code.C-20261108-1, bothplugin.jsonfiles bumped to 0.4.1, and a line added toai-docs/log.md. SKILL.md is unchanged.Verification
python skills/obsidian-notes/scripts/test_vault_lint.py: all checks pass.python tests/test_repo.py: all checks pass.vault_lint.py . --exclude fixtures: 0 errors, 0 warnings.