jupyter-book / jupyterlab-myst

Use MyST Markdown directly in Jupyter Lab
https://jupyter-book.github.io/jupyterlab-myst/
BSD 3-Clause "New" or "Revised" License
141 stars 16 forks source link

Headings get shown twice in first cell of a notebook #229

Open batpad opened 5 months ago

batpad commented 5 months ago

Description

Steps to reproduce: In the first cell of a new notebook, convert to a Markdown cell and type the following text:

## Test heading

some text

Expected Output: Test Heading to be in an <h2> tag or so, and appear once.

Actual: Test Heading appears twice. It seems to generate an additional <h1> tag with markup like this:

<div id="skip-to-frontmatter" aria-label="article frontmatter" class="" style=""><h1 class="mb-0">Test heading</h1></div>

Screenshot of what this looks like:

image

Interestingly, this does not affect <h1> headings, so this issue does not affect this:

# Test heading

some text

Also, this only occurs in the first cell of a new notebook and does not affect subsequent cells.

Additional notes

I am testing this off the main branch running Jupyter lab locally. I can also see the issue present on a remote Jupyterhub running v2.3.1 .

This issue maybe the same as https://github.com/executablebooks/jupyterlab-myst/issues/222#issuecomment-2007702221 ?

cc @rowanc1

welcome[bot] commented 5 months ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

agoose77 commented 4 months ago

Yes, for now this only affects <h2> headings. @fwkoch do you have a feeling about whether we want to relax this and lift any heading?

batpad commented 2 months ago

gentle bump here .. have had a few more users complain about this .. is there anything we could do to try and help? Thanks again :-)