feat(nvim): inline #hashtags become tags on save (§8.3)
Some checks failed
Build / validate (pull_request) Failing after 4m57s

On save, whitespace-prefixed `#hashtags` in a node's body are unioned
into its tag set (via `frontmatter.hashtags` + the existing tag diff), so
you can tag a note by writing `#kitchen` inline. A markdown `# heading`
has a space after the `#`, so it never matches. e2e covers it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-06-03 11:57:25 -07:00
commit 8dc98dc9c1
5 changed files with 54 additions and 9 deletions

View file

@ -51,7 +51,7 @@ function M.write(buf, _uri)
-- block ⇒ the user removed it; treat the whole buffer as body, touch no
-- metadata.) The backend also strips defensively, so `body` is what stores.
local canonical = M._canonical[buf] or {}
frontmatter.apply(id, canonical, fm)
frontmatter.apply(id, canonical, fm, body)
if fm.title and fm.title ~= canonical.title then
params.title = fm.title
end