larstvei / ox-gfm

Github Flavored Markdown Back-End for Org Export Engine
230 stars 44 forks source link

Help? Gitlab overrides header anchors #34

Open KedneckInc opened 5 years ago

KedneckInc commented 5 years ago

The org-export-get-reference method returns an arbitrary ascii sequence which is used to construct both an anchor and a link, when creating a table of contents.

Gitlab does not pay any attention to those anchors. In fact, it utterly removes them from the displayed markdown file, and replaces them with it's idea of what a good anchor is:

<h2 dir="auto">&#x000A;<a id="user-content-install-your-ssh-certificate" class="anchor" href="#install-your-ssh-certificate" aria-hidden="true"></a>Install your SSH certificate</h2>

Unfortunately, the table of contents generated by org-mode "Export to Github Flavored Markdown" still uses the arbitrary ascii sequence:

<li> <a href="#orgff37d6f">Install your SSH certificate</a>&#x000A;</li>

Now I do recognize that this is a module for gitHUB flavored markdown, but I'm wondering if there's anything that could work for gitLAB flavored markdown, without having to rewrite the entire TOC generation process?

Thanks!