satyagraha / gfm_viewer

An Eclipse plugin providing an accurate view of GitHub Flavored Markdown (.md) files
94 stars 27 forks source link

GitHub Anchors #83

Closed jonathanlabin closed 8 years ago

jonathanlabin commented 8 years ago

I'm finding that anchors are not working for me (v1.9.3) If I include the header: # 1 Introduction

and provide a link with [Introduction](#1-introduction)

the link does not work in the preview or when the html is viewed in a different browser.

Looking further, I see the page souce contains: <a id="user-content-1-introduction" class="anchor" href="#1-introduction" aria-hidden="true">

which explains why the links aren't working. Can this "user-content-" prefix be stripped out from the resulting html?

satyagraha commented 8 years ago

This is a fairly recent change from GH, q.v. https://github.com/revolunet/sublimetext-markdown-preview/issues/208#issuecomment-202945428 . There is already code in the plugin to handle an earlier version of this issue, so I'll see what can be done.

satyagraha commented 8 years ago

Fixed in 2.0.1 now available.