joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.42k stars 423 forks source link

fix: scrollToHash get anchor by name #328

Open dolsup opened 3 years ago

dolsup commented 3 years ago
<p><a name="user-content-debug.proto"></a></p>
<p align="right"><a href="#top">Top</a></p>
<h2>
<a id="user-content-debugproto" class="anchor" href="#debugproto" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>debug.proto</h2>

This is my exported index.html. ids of \ tags including headers don't have .(period), but names of \ tags in \

above headers have original reference with ..

When a header had periods or anything IDK in their name, Its link is broken.

So I fixed it to use anchors with the name instead of anchors with id including header tag. I think this is why <p><a name="..."></a></p> is exists.

dolsup commented 3 years ago

If you don't mind, could you put label hacktoberfest-accepted on this issue?

dolsup commented 3 years ago

@joeyespo Please check this out. This is a bug. a feature does not work.