Incorrect TOC for reference link
See original GitHub issueWhat is the problem?
### Via [remark-cli][]
[remark-cli]: https://github.com/remarkjs/remark/tree/master/packages/remark-cli
<!-- output -->
- [Via [remark-cli][]](#via-remark-cli)
<!-- expected -->
- [Via remark-cli](#via-remark-cli)
How can I reproduce it?
Is there any error message in the console?
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Error! Hyperlink reference not found. in Word TOC
Hyperlink reference not found. in Word TOC. When I update an entire Table of Contents, all deleted items start with inserted text "Error!...
Read more >Incorrect Link in ToC to Bibliography Heading - LaTeX.org
This way of bringing the bibliography into the ToC doesn't produce an anchor for hyperref. Hence it generates a false page link. You...
Read more >Incorrect ToC/Index cross-references when resetting memoir ...
Here, cross-references in the ToC and in the Index all work correctly. But I want to reset Chapter numbers back to "1" in...
Read more >[How-To] FIX PAGE NUMBERS in a Table of ... - YouTube
If you find yourself wondering how to fix the incorrect page numbers in a ... The cost to you is the same whether...
Read more >CDM 10.2.2 - Page Number on TOC is Incorrect When ... - IBM
Problem. When generating the document in CDM 10.2. · Symptom. TOC Variables in TOC Object do not match actual page number(s). · Cause....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It should be fixed in the dev build.
Thanks for fixing it!
One small problem still: the regex does NOT match shortcut-style links (
[this]vs[this][0]), so those are left.It looks like changing the regex to make the second set of brackets optional fixes that (
\[([^\]]*)\](?:\[[^\]]*\])*). I’ve gone ahead and done this in #655