danielfrg / mkdocs-jupyter

Use Jupyter Notebook in mkdocs
https://mkdocs-jupyter.danielfrg.com
Apache License 2.0
402 stars 49 forks source link

Fix of possible issue with Table of Contents when leaving code under backquotes in markdown #202

Closed mikry13 closed 5 months ago

mikry13 commented 5 months ago

I recently started to use "mkdocs" with "mkdocs-jupyter" package for my notebooks and stumbled across an issue, when I used C++ code samples under backquotes.

Basically if there's a line starting with number sign (#) within 1-3 backquotes (`), which is allowed in markdown, table of contents stops before first encounter of this.

For example, before changes, this IPython Notebook: image

resulting in this page (look at the table of contents on the right) image

After changes: image

Sadly I couldn't successfully run the other tests (regardless of any changes), but I set up project via rye as described in CONTRIBUTING.md

danielfrg commented 5 months ago

Thanks!

github-actions[bot] commented 5 months ago

Preview deployment

Name Link
Deploy Preview Url https://653d2922.mkdocs-jupyter-danielfrg-com.pages.dev
Latest deploy log https://github.com/danielfrg/mkdocs-jupyter/actions/runs/9419039898
Latest commit 1570e742f733b343288683c9ec674d0c3a35d43a
Environment production