You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Last item in frontmatter shows up in the outline as H2, unless a blank line is added #442
The last item in the frontmatter of a note is being parsed as an H2 for the outline view, due to the closing frontmatter marker --- being read as the alternative heading markup for an H2 heading:
This is an H2 Heading
---
Example
So, for this example...
---title: Testtype: Test---
... the outline shows H2: type: Test
Adding a blank line at the end of the frontmatter block fixes the mis-parsing...
---title: Testtype: Test---
To Solve
The outline parser should skip the whole of the frontmatter block
It was 2.15 that I was using... I know the release notes mentioned fixing an issue to do with the front matter itself being rendered incorrectly, but the issue I mention here is to do with the outline panel display... The front matter looks fine, but the outline shows a phantom H2 heading.
Fixed in c254162 (on the v2.16.0 branch), shipping in the next release.
You were right that this is distinct from the v2.15.0 frontmatter fix (#426): that one stopped the last frontmatter line from rendering as a big heading in the editor, whereas this is the outline parser. Same root cause, though. A note's closing frontmatter --- was being read as a Setext-style H2 underline for the line above it, so with no blank line before the fence:
---title: Testtype: Test---
type: Test surfaced as a phantom H2 in the outline.
The outline parser now skips the whole leading frontmatter block before it looks for headings (matching the editor's own frontmatter detection). Since that same parser also backs the outline palette, [[#heading]] link resolution, and wikilink navigation, those stop matching the phantom heading too.
Verified with new unit tests covering your exact example, and by driving the built desktop app over CDP: a note with title: / type: frontmatter plus two real headings now shows exactly two outline entries, no phantom.
Thanks for the clear report and the precise repro.
Activity
naingyeminn commentedon Jul 22, 2026
I think it had been fixed in v2.15.0.
stevecopley commentedon Jul 22, 2026
It was 2.15 that I was using... I know the release notes mentioned fixing an issue to do with the front matter itself being rendered incorrectly, but the issue I mention here is to do with the outline panel display... The front matter looks fine, but the outline shows a phantom H2 heading.
adibhanna commentedon Jul 22, 2026
Fixed in c254162 (on the
v2.16.0branch), shipping in the next release.You were right that this is distinct from the v2.15.0 frontmatter fix (#426): that one stopped the last frontmatter line from rendering as a big heading in the editor, whereas this is the outline parser. Same root cause, though. A note's closing frontmatter
---was being read as a Setext-style H2 underline for the line above it, so with no blank line before the fence:type: Testsurfaced as a phantomH2in the outline.The outline parser now skips the whole leading frontmatter block before it looks for headings (matching the editor's own frontmatter detection). Since that same parser also backs the outline palette,
[[#heading]]link resolution, and wikilink navigation, those stop matching the phantom heading too.Verified with new unit tests covering your exact example, and by driving the built desktop app over CDP: a note with
title:/type:frontmatter plus two real headings now shows exactly two outline entries, no phantom.Thanks for the clear report and the precise repro.
Fix(outline): skip frontmatter so its closing --- isn't parsed as a h…