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

Add option to preserve original heading markup in TOC sidebar #2842

Open
septatrix opened this issue Nov 12, 2024 · 0 comments
Open

Add option to preserve original heading markup in TOC sidebar #2842

septatrix opened this issue Nov 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@septatrix
Copy link

Is your feature request related to a problem? Please describe

Sometimes on uses markup in headers like code sections or emph/bold...or where this is most apparent: strikethrough (foo). Another think which often gets added to headers are badges/pill. Most of the time it would make sense to also show them in the TOC.

If these are displayed in the sidebar without their markup they can unexpectedly look different, have a completely different meaning (if strikethrough is omitted), or are just harder to spot (badges).

Describe the solution you'd like

It should be possible to preserve show the entries in the TOC in the same way they are in the original headers, just with a smaller font size.

Describe alternatives you've considered

Not using markup in headings any more or living with the style getting lost. For emph, bold, and code styling this is somewhat acceptable as they text without styling is semantically the same. Losing strikethrough, however, would lead to a different meaning. The only option is to stop using it but this restricts how one can author their content.
Additionally, for stuff like badges there is no satisfactory workaround.

@septatrix septatrix added the enhancement New feature or request label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant