emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: The headers' anchors from custom ids should be at the begin


From: Nicolas Goaziou
Subject: Re: [O] Bug: The headers' anchors from custom ids should be at the beginning, and not at the end, of these headers [8.3.1 (8.3.1-129-ga7c8d2-elpa @ /home/bitouze/.emacs.d/elpa/org-20150921/)]
Date: Tue, 22 Sep 2015 21:39:59 +0200

Hello,

address@hidden (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]