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

[BUG] Markdown Headings IDs issue #502

Closed
acev0010 opened this issue Dec 1, 2023 · 2 comments · Fixed by #528
Closed

[BUG] Markdown Headings IDs issue #502

acev0010 opened this issue Dec 1, 2023 · 2 comments · Fixed by #528
Labels
bug Something isn't working development Related to anything for development

Comments

@acev0010
Copy link
Contributor

acev0010 commented Dec 1, 2023

Describe the bug

Description of the issue

Using special characters (specifically a colon) on the heading of the markdown files will result in the ID not being translated properly and making skip links unusable.

A temporary solution for this is by adding the id on the side like this: "## Tool: WAVE Browser Extensions {#tool-wave-browser-extensions}".

It might be related to the plugin we use, "markdown-it-anchor".

Expected behaviour
Headings with special characters should be transformed properly.

For example: "## Tool: WAVE Browser Extensions"
Should be: "<h2 id="tool-wave-browser-extensions" tabindex="-1">Tool: WAVE Browser Extensions</h2>"
instead, we get something like this: "<h2 id="to^&$wave-browser-extensions" tabindex="-1">Tool: WAVE Browser Extensions</h2>"

Who shall do the work?
[I will do it, I want to contribute] or [I am asking for someone else to please do the work]

Version of gc-da11yn you are using

No response

OS or Device: (e.g. iOS)

Desktop

Browser (e.g. Chrome, Safari)

Chrome

Version (e.g. 22)

No response

Additional context

No response

@acev0010 acev0010 added pending triage Someone will triage this issue once ready bug Something isn't working labels Dec 1, 2023
@acev0010
Copy link
Contributor Author

acev0010 commented Dec 7, 2023

This seems to be a problem with markdown-it-anchor, I found this issue in their GitHub development project. I left a comment to try to find a solution:

valeriangalliat/markdown-it-anchor#127

@shawnthompson
Copy link
Contributor

I think you can add that code into the .eleventy.js in the eleventyConfig function

@shawnthompson shawnthompson added development Related to anything for development and removed pending triage Someone will triage this issue once ready labels Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working development Related to anything for development
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants