-
-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
12.1.0
Link to runnable example
No response
Steps to reproduce
Run this markdown:
# Run a container whose image is pulled from internal GitLab <!-- comment -->
[Link](#run-a-container-whose-image-is-pulled-from-internal-gitlab)
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
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
## Run a container whose image is pulled from internal GitLab <!-- comment -->
[Link](#run-a-container-whose-image-is-pulled-from-internal-gitlab)
validate-links-bug.md
3:1-3:68 warning Link to unknown heading: `run-a-container-whose-image-is-pulled-from-internal-gitlab`. Did you mean `run-a-container-whose-image-is-pulled-from-internal-gitlab----comment---` missing-heading remark-validate-links
⚠ 1 warning
Runtime
Node v16
Package manager
npm 8
OS
macOS
Build and bundle tools
Other (please specify in steps to reproduce)