Hello, dbito...@wanadoo.fr (Denis Bitouzé) writes:
> The following org file: > > #+begin_src org > * Heading with custom id > :PROPERTIES: > :CUSTOM_ID: custom-id-heading > :END: > > * Heading bis with custom id and very very very very very very very very very > very very very very very very very very very very very very very very very > long text > :PROPERTIES: > :CUSTOM_ID: custom-id-heading-bis > :END: > > See [[#custom-id-heading-bis][heading bis with custom id and very long text]]. > #+end_src > > is exported as markdown to: > > #+begin_src markdown > <div id="table-of-contents"> > <h2>Table of Contents</h2> > <div id="text-table-of-contents"> > <ul> > <li><a href="#custom-id-heading">1. Heading with custom id</a></li> > <li><a href="#custom-id-heading-bis">2. Heading bis with custom id and very > very very very very very very very very very very very very very very very > very very very very very very very very long text</a></li> > </ul> > </div> > </div> > > # Heading with custom id<a id="custom-id-heading"></a> > > # Heading bis with custom id and very very very very very very very very very > very very very very very very very very very very very very very very very > long text<a id="custom-id-heading-bis"></a> > > See [heading bis with custom id and very long text](#custom-id-heading-bis). > #+end_src > > As you can see, the anchor in the .md file is at the end of the header and, in > case this header contains long text, clicking on a link to this anchor would > lead us to the end, eventually not at the first line, of this header. True. But there's a trade-off: putting anchor at the beginning of the heading is less readable. So I'm not sure it is a clear win. Regards, -- Nicolas Goaziou