fix: remove H1 heading from new note editor body

Title is already shown as a separate UI element above the editor,
so the H1 in the body was a visual duplicate. New notes now have
an empty editor body. Daily notes and type entries also no longer
get an H1 inserted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-04-02 18:29:02 +02:00
parent ccf1b8517e
commit cd39070569
4 changed files with 14 additions and 14 deletions

View File

@@ -116,11 +116,11 @@ describe('entryMatchesTarget', () => {
describe('buildNoteContent', () => {
it('generates frontmatter with status', () => {
expect(buildNoteContent('My Note', 'Note', 'Active')).toBe('---\ntitle: My Note\ntype: Note\nstatus: Active\n---\n\n# My Note\n\n')
expect(buildNoteContent('My Note', 'Note', 'Active')).toBe('---\ntitle: My Note\ntype: Note\nstatus: Active\n---\n')
})
it('omits status when null', () => {
expect(buildNoteContent('AI', 'Topic', null)).toBe('---\ntitle: AI\ntype: Topic\n---\n\n# AI\n\n')
expect(buildNoteContent('AI', 'Topic', null)).toBe('---\ntitle: AI\ntype: Topic\n---\n')
})
it('includes template body when provided', () => {