emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: HTML export fails to set source IDs correctly [8.3.4 (8.3.4


From: Nicolas Goaziou
Subject: Re: [O] Bug: HTML export fails to set source IDs correctly [8.3.4 (8.3.4-elpa @ /Users/aaron/.emacs.d/elpa/org-20160222/)]
Date: Thu, 25 Feb 2016 21:19:53 +0100

Hello,

Aaron Miller <address@hidden> writes:

> Expected: When exporting an Org document with named source blocks to 
> HTML, each <pre> generated to contain a source block has an ID attribute 
> matching the source block's name.
>
> Actual: Instead, ID attributes come out with values like "orgsrcblock1".
>
> Test case:
> --- >8 cut here ---
> #+TITLE: bug test case
>
> #+NAME: a-source-block
> #+BEGIN_SRC emacs-lisp :eval never
> ;; hi
> #+END_SRC
> --- 8< cut here ---
>
> Expected result (its salient subset):
> --- >8 cut here ---
> <pre class="src src-emacs-lisp" id="a-source-block">
> ;; hi
> </pre>
> --- 8< cut here ---
>
> Actual result (its likewise):
> --- >8 cut here ---
> <pre class="src src-emacs-lisp" id="orgsrcblock1">
> ;; hi
> </pre>
> --- 8< cut here ---
>
> Note the erroneous ID attribute value.

The attribute is intended.

> The issue here is that, in `org-html-src-block' and 
> `org-html-inline-src-block', the fallback behavior for ID attribute 
> value is implemented in terms of `and', rather than `or'. Since `and' 
> short-circuits only when it encounters a null argument, the desired 
> behavior is effectively inverted.

Actually this is the desired behaviour: when a label is specified, make
sure to replace it with our internal unique and safe label. Hence the
`and'.


Regards,

-- 
Nicolas Goaziou



reply via email to

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