satyagraha / gfm_viewer

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

Support for GFM-style link to header #66

Closed dschulten closed 10 years ago

dschulten commented 10 years ago

GFM automatically adds anchors to headers so that you can link to them like so

## Foo Header
lorem ipsum...
see [above](#foo-header)

However in gfm-viewer, when I click the above link, the browser shows a page not found message.

Even if I add a plain markdown anchor to the header like this:

## Foo Header <a name="foo-header"></a>

I get the same effect. Using id instead of name makes no difference.

Preferably it should work both ways, i.e. by automatically generating a GFM style anchor for the header and allowing navigation to a plain-markdown header, too.

satyagraha commented 10 years ago

Hi, thanks for the bug report. This feature was previously implemented and used to work fine, but recently GitHub changed their markdown processing API and have broken several projects: https://github.com/revolunet/sublimetext-markdown-preview/issues/208 https://github.com/aheckmann/greadme/issues/13 https://github.com/joeyespo/grip/issues/58

I'll have to examine the possible work-arounds to see what's the best solution.

satyagraha commented 10 years ago

I've implemented a work-around in a new version available from update site http://dl.bintray.com/satyagraha/generic/1.9.1

If you get a chance to try it, let me know if it helps, thanks.

satyagraha commented 10 years ago

I forgot to mention that with the new release to see the fix you will need to regenerate the .md.html files, which you can do via the refresh icon on the GFM view or via the Generate Markdown Preview context menu entry .

paulvi commented 10 years ago

@satyagraha Could there be more straight way to discover where is latest beta?

e.g. wiki ?

satyagraha commented 10 years ago

Fixed in 1.9.2.