From f3b6b4ed4a2e72a983a04e4e57933c469cc8baa0 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Sat, 14 Feb 2026 20:25:02 +0100 Subject: [PATCH] Hide YAML frontmatter from editor view - Add frontmatterHide extension that hides --- ... --- block at top of files - Shows collapsed --- indicator, reveals on cursor focus - Place initial cursor after frontmatter so content is visible on load - Remove frontmatter detection from livePreview (handled by dedicated extension) - Add Playwright test for frontmatter hiding Co-Authored-By: Claude Opus 4.6 --- src/components/livePreview.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/livePreview.ts b/src/components/livePreview.ts index c4ad7aa8..84eac3e3 100644 --- a/src/components/livePreview.ts +++ b/src/components/livePreview.ts @@ -30,6 +30,7 @@ class HrWidget extends WidgetType { function buildDecorations(view: EditorView): DecorationSet { const decs: Range[] = [] + const tree = syntaxTree(view.state) tree.iterate({