-
-
Notifications
You must be signed in to change notification settings - Fork 941
Markdown Headings not appearing correctly for non Starlight Content #3175
Copy link
Copy link
Closed
Description
What version of starlight are you using?
0.34.2
What version of astro are you using?
5.7.10
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
I have a Starlight Project that uses Markdown both from an Astro page, and with the Starlight Content.
After upgrading Starlight from 0.33.x to 0.34.x, it appears to have broken the Headings of my Astro Markdown page.
Headings are now rendered like:
<div class="sl-heading-wrapper level-h2">
<h2 id="interpretation-and-definitions">Interpretation and Definitions</h2>
<a class="sl-anchor-link" href="#interpretation-and-definitions">
<span aria-hidden="true" class="sl-anchor-icon">
<svg width="16" height="16" viewBox="0 0 24 24">
...
</svg>
</span>
<span class="sr-only">Section titled “Interpretation and Definitions”</span>
</a>
</div>
instead of just:
<h2 id="interpretation-and-definitions">Interpretation and Definitions</h2>
I don't have a problem with the revised HTML.
However, because the CSS classes that it is referencing (e.g., 'sl-heading-wrapper', 'sl-anchor-link', etc.) are not being loaded into the page, it is not being rendered correctly.
I also do not see a way to load these as only style/markdown.css is exported.
I have create a simple project to reproduce the issue:
This may be related to #3162
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-starlight-tscz1rbh?file=README.md
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels