Skip to content
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

Comments in code cells break nav structure #182

Open
Peter9192 opened this issue Jan 5, 2024 · 1 comment
Open

Comments in code cells break nav structure #182

Peter9192 opened this issue Jan 5, 2024 · 1 comment

Comments

@Peter9192
Copy link

Thanks for the nice plugin!

I noticed that a notebook with a markdown code cell like below breaks the headers in the navigation side bar:

# Example notebook

This represents a top markdown cell.

some text

## Header before code block 
This header is shown in sidebar

Let's say I want to give an example code (not a code cell, just a code block in markdown)
Using double backticks below as I have no clue how to render nested fenced code blocks in a github issue.

``python
1+1 = 2

# This seems off:
1+1=3
`` 

## Header after code block
This header is not shown in the sidebar.

Would it be possible to ignore hashtags in markdown code block while parsing the notebook?

@mrdbourke
Copy link

+1 to this, I'm also having the same issue.

I've been using a hack of turning code blocks into images, however, this is not ideal long-term.

Perhaps it's an issue with nbconvert?

I'm reading old issues here: ipython/ipython#5345

But they may be unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants