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
Headings with inline comments are slugged incorrectly #73
Comments
Previously, HTML was always included. Sometimes you don’t want that. Set `includeHtml: false` to ignore it. Related-to: remarkjs/remark-validate-links#73.
Thanks for your report. Please note that the href you use in the link as your desired output, does not match how GitHub works. As the prose you show includes the word Gitlab, you might be using Gitlab. Perhaps the link you use is specific to Gitlab. We match GitHub. If you use Gitlab, please remove the comment from your heading. |
Thanks a lot! And indeed, I'd spotted that too :) |
Ay chance of a new release, @wooorm ? I tried to install with |
Done in 12.1.1! |
Thank you! |
Initial checklist
Affected packages and versions
12.1.0
Link to runnable example
No response
Steps to reproduce
Run this markdown:
Through remark-validate-links:
remark --use remark-validate-links
Here's the same markdown to show the GitHub heading link doesn't include ----comment---- at the end:
Run a container whose image is pulled from internal GitLab
Link
Expected behavior
Shouldn't include inline comments as heading identifier. I looked at the code and it's the node toString that gets passed to the slugger, so it should probably be removed beforehand, as it's not printable, which is what the slugger docs ask to be passed.
Actual behavior
Runtime
Node v16
Package manager
npm 8
OS
macOS
Build and bundle tools
Other (please specify in steps to reproduce)
The text was updated successfully, but these errors were encountered: