-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML header contents in markdown notebook cells not correctly populated in breadcrumbs #134853
Comments
Here's the relevant code: vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts Line 416 in 5c8ba90
We currently only look for markdown headers. Instead, we'd likely want to get the headers from the rendered markup. That would nicely support other types of rendered markup or extensions to the markdown rendering |
This would also be a big improvement for Outline view I believe. Jupyter picks up HTML headers and adds them to the table of contents view, but in VS Code we miss out on them so the structure looks funny with some notebooks. |
Pushed a fix to parse the content for h1 to h6 headers written as HTML tags. It's synchronous and performant, doesn't require the full rendering of all markdown cells either. The catch with this is we are only finding headers, the markdown cells with cc @mjbvz what's your recommendation of improving this further more? |
@rebornix Do you mean handling cases where the user has written raw html tags inside their markdown? For that we could turn on
That will let the tags through, which I think is ok so long as are only looking at the tokens and not actually rendering the resulting html |
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: