fix(hooks): session digest skips HTML comment blocks in journal.md

This commit is contained in:
bchanot committed 2026-11-09 18:21:11 +01:00
1 parent db5bbe5fd8
commit 8c284f76a3
2 files changed
+13 -1

No files matched your search

+2 -1
View File
@@ -403,7 +403,8 @@ _digest_todo() { # <root> → first 3 unchecked Actionable items
_digest_journal() { # <root> → last journal bullet
local last
last=$(grep '^- ' "$1/.claude/memory/journal.md" | tail -1)
last=$(awk '/^[ \t]*<!--/ { c = 1 } !c && /^- / { l = $0 } /-->/ { c = 0 }
END { if (!c) print l }' "$1/.claude/memory/journal.md")
[ -n "$last" ] && echo "- journal: ${last#- }"
}