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
When editing a Markdown document with YAML front-matter, the Table of Contents shows only the last item of frontmatter.
Reproduce
Open the Launcher
Click on Markdown File
Open the Table of Contents sidebar
Add a header
# Hello World
See Hello World in the Table of Contents
Add some YAML front matter before the header
---foo: barboo: baz---# Hello World
See only boo: baz in the Table of Contents
This was found while working on a JEP in JupyterLab.
By adding a newline above the second ---, the problem also goes away, so presumably it's treating that last item as an h2 which counterfeits everything below it.
Expected behavior
Definitely see all the headers
Maybe see a collapsible table above/below the rest of the items
but definitely not worth adding/faking a YAML parser
maybe just a chunk of YAML-formatted code (e.g. if the first line starts with [^:]+:
Description
When editing a Markdown document with YAML front-matter, the Table of Contents shows only the last item of frontmatter.
Reproduce
Open the Launcher
Click on Markdown File
Open the Table of Contents sidebar
Add a header
# Hello World
See Hello World in the Table of Contents
Add some YAML front matter before the header
See only
boo: baz
in the Table of ContentsBy adding a newline above the second
---
, the problem also goes away, so presumably it's treating that last item as anh2
which counterfeits everything below it.Expected behavior
[^:]+:
Context
The text was updated successfully, but these errors were encountered: