pages-themes / leap-day

Leap day is a Jekyll theme for GitHub Pages
https://pages-themes.github.io/leap-day/
Creative Commons Zero v1.0 Universal
203 stars 483 forks source link

Table of Content Should Use Header "id"s If Possible #49

Open Zehua-Chen opened 3 years ago

Zehua-Chen commented 3 years ago

During the table of content generation, the current implementation would use the content of the header, transform it a little bit, and then use the transformed as the id of the header and the ref of the table of content entries.

For non-ASCII headers that have custom ids, this approach proves problematic, as no ID will be generated from the non-ASCII header, resulting in a broken table of content.

# 注意事项 {#notes}

To fix this, I think the ID of headers should be used if they are available, and we only fall back to header content otherwise.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.