Skip to content

Strip leading and trailing dots from Obsidian note names - #522

Merged
arrry-hydraDB merged 1 commit into
hydra-db:mainfrom
jaywyawhare:fix/obsidian-note-dots
Nov 26, 2026
Merged

arrry-hydraDB merged 1 commit into
hydra-db:mainfrom
jaywyawhare:fix/obsidian-note-dots

Conversation

@jaywyawhare

@jaywyawhare jaywyawhare commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

_stem / stem cleaned a note file name with a single pass of strip-whitespace, strip-dots, strip-whitespace. Stripping the dots could expose whitespace, and stripping that whitespace could expose more dots, which were left in place. A name like . .NET became .NET.md, a hidden file Obsidian does not index, so that entity's note and every link to it were missing from the vault. The pass was also not idempotent.

Both SDKs now repeat strip-whitespace-then-dots until the value stops changing. The byte-length truncation path already recurses through the same cleanup, so a name cut mid-dot is trimmed too. A name left empty still falls through to the existing numbered fallback.

export_obsidian: [". .NET", "Acme. .", "v1. ."]  ->  NET.md, Acme.md, v1.md

Linked issue

Closes #357

Checklist

  • Fixed in both SDKs (src/selfgraph/_export.py, typescript/src/export.ts), identical behaviour.
  • Regression tests in both SDKs (tests/test_trust.py, typescript/test/trust.test.ts) that fail on main and pass with the fix.
  • Extended the vault_names conformance pair with the dotted and truncated-then-dotted cases, so the two SDKs stay byte-identical.
  • Lint, typecheck, precheck, and the Kuzu conformance run clean.

Breaking changes

None. Note names that were already valid are unchanged; only names with leading or trailing dots (after whitespace) change, and they become indexable.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions

Copy link
Copy Markdown

This is PR 1 of 10 you may keep open at a time.

@github-actions

Copy link
Copy Markdown

Start the description with ## Summary, followed by one collapsed <details> block that holds everything else, as in .github/pull_request_template.md.

The AI assistance section is missing from the PR description. Restore it from the PR template and disclose whether AI tools were used.

1 similar comment
@github-actions

Copy link
Copy Markdown

Start the description with ## Summary, followed by one collapsed <details> block that holds everything else, as in .github/pull_request_template.md.

The AI assistance section is missing from the PR description. Restore it from the PR template and disclose whether AI tools were used.

@arrry-hydraDB
arrry-hydraDB merged commit 66f6a4e into hydra-db:main Nov 26, 2026
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Obsidian export leaves leading and trailing dots in note names

2 participants