question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Additional markdown headings in cell are ignored

See original GitHub issue

Thanks again for the continued progress! I’ve noticed a regression – if a markdown cell in a notebook has more than one heading, for example:

# Level 1 heading
## Level 2 heading
# New level 1

Only the first Level 1 heading shows up in the TOC. It used to be the case that all headings were there, but now, to get them to show up, I have to split these markdown cells (into 3, for this example) so each has the heading as the first line of the cell. It would be nice if we were able to have the previous behavior back where all headings within a cell are captured.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:10
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
spencermathewscommented, Feb 25, 2019

I definitely appreciate that including all headers in a cell could lead to some complicated interactions with potential future features. Regardless of how that might be resolved, I would submit that including all headings in the TOC is simply the expected behavior, regardless of if they happen to be in the same cell.

1reaction
kenjiomancommented, Nov 13, 2019

I agree with the toggle feature.

A naive/ new user, I believe, will expect the table of contents to capture the full structure (headings/ sub-headings) of a document. Granted, going forward, document creators, knowing the limitation of jupyterlab’s TOC, can design their document with the constraint of having headings/sub-headings broken out into their own cells. However, the naive assumption will fail for past notebooks that weren’t designed this way.

I also recognize the desire for the collapse state from the TOC to propagate to what of the notebook is actually displayed as well (and the complexities this brings in the document model that kgryte mentioned above in https://github.com/jupyterlab/jupyterlab-toc/issues/54#issuecomment-553155370). In order to get the best of both worlds, I think a toggle would make sense – toggled one way, all headings show up, with collapse-ability turned off. Toggled the other way, notebooks sections can be hidden by TOC, but any additional headings don’t show up in TOC.

Granted, as a user that is not able to contribute to this feature request, I am fully appreciative of what has been done, what will be done, and design decisions made to simplify development 😃

Thanks again for all the awesome work with jupyterlab and TOC! This is a great contribution to the world: 🌎 🌏 🌍 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with Tables in GitHub Markdown - Pluralsight
The header of a markdown table consists of two rows. The first row is the column headers for the table. To specify the...
Read more >
How to remove heading numbers in Jupyter during pdf ...
You can write an unnumbered heading by appending {-} or {.unnumbered} to the Markdown cell, e.g.: Heading {-}. The output is a heading...
Read more >
Handbook Markdown Guide - GitLab
For our Blog, everything in this guide can be applied. Read through the Blog Formatting Guidelines for further information.
Read more >
Markdown Guide: Basics, Tips and Tricks on how to use ... - iA
Note that inline formatting (like _underscores_ ) is ignored in code. ``` This is a fenced code block ```. Footnotes. Add a footnote...
Read more >
Markdown reference for Microsoft Learn - Contributor guide
In the following example, both in the metadata title and the Markdown header the word Document will be ignored during the localization process....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found