Re: [O] ox-html export bug
Hello, Fabrice Popineau writes: > 2017-09-08 19:40 GMT+02:00 kadal : > >> That said, the first option is better because if I'm setting a CUSTOM_ID, >> that's what should be used for internal links... >> >> > I agree with that. Ideally, if you set a CUSTOM_ID, then it should replace > the default org generated id. Using raw CUSTOM_ID value in exported documents is an issue because it requires the user to know, ahead of time, what are the allowed characters in the output format. As an example, I would consider it to be a bug if Org refused to export my document to pdf because I had chosen "100%" as a custom ID somewhere in the document. However, HTML is a bit special in this case, because users expect to see custom ID in the address bar of their browser. Hopefully this is now fixed. Thank you. Regards, -- Nicolas Goaziou0x80A93738
Re: [O] ox-html export bug
2017-09-08 19:40 GMT+02:00 kadal : > On 09/08/2017 10:32 AM, Nicolas Goaziou wrote: > >> kadal writes: >> >> Seems like the second one should export to either "" >>> or "". >>> >> >> Is it valid HTML? >> >> Regards, >> >> This SO thread has confusing answers: https://stackoverflow.com/ques > tions/192048/can-an-html-element-have-multiple-ids#192066 > > Looks like the second option will work. Not valid according to : https://www.w3.org/TR/html5/syntax.html#attributes-0 "There must never be two or more attributes on the same start tag whose names are an ASCII case-insensitive match for each other." > That said, the first option is better because if I'm setting a CUSTOM_ID, > that's what should be used for internal links... > > I agree with that. Ideally, if you set a CUSTOM_ID, then it should replace the default org generated id. Regards, Fabrice
Re: [O] ox-html export bug
On 09/08/2017 10:32 AM, Nicolas Goaziou wrote: kadal writes: Seems like the second one should export to either "" or "". Is it valid HTML? Regards, This SO thread has confusing answers: https://stackoverflow.com/questions/192048/can-an-html-element-have-multiple-ids#192066 Looks like the second option will work. That said, the first option is better because if I'm setting a CUSTOM_ID, that's what should be used for internal links... Deepak
Re: [O] ox-html export bug
Fair point. Would it be sufficient to give these type of links a class, say "org-internal-links". Then you should be able to explicitly turn off the content for these links. .org-internal-links::after {content:"";} I don't know, looks like a bug to me. I haven't put much thought into it, but I wonder if it would be possible to ignore EXTRA-IDS and only use PREFERRED-ID (see `org-html-headline'), i.e., use (or (org-element-property :CUSTOM_ID headline) (org-export-get-reference headline info)) It could be a problem when publishing to HTML, but I'm not sure at this point. Going back to the original report: -- 1 heading 1 2 heading 2 --- The first headline with no CUSTOM_ID exports to "" The second headline with a CUSTOM_ID exports to "id="orge4e91c4">" Seems like the second one should export to either "" or "". Not sure why the empty link is being inserted or needs to be there at all. Deepak
Re: [O] ox-html export bug
kadal writes: > Seems like the second one should export to either "" > or "". Is it valid HTML? Regards,
Re: [O] ox-html export bug
Hello, Rasmus writes: > kadal writes: > >> The problem is that if you have CSS that decorates links by adding >> content after a link, that (empty) link gets decorated too. > > Fair point. Would it be sufficient to give these type of links a class, > say "org-internal-links". Then you should be able to explicitly turn off > the content for these links. > > .org-internal-links::after {content:"";} I haven't put much thought into it, but I wonder if it would be possible to ignore EXTRA-IDS and only use PREFERRED-ID (see `org-html-headline'), i.e., use (or (org-element-property :CUSTOM_ID headline) (org-export-get-reference headline info)) It could be a problem when publishing to HTML, but I'm not sure at this point. Regards, -- Nicolas Goaziou
Re: [O] ox-html export bug
kadal writes: > The problem is that if you have CSS that decorates links by adding > content after a link, that (empty) link gets decorated too. Fair point. Would it be sufficient to give these type of links a class, say "org-internal-links". Then you should be able to explicitly turn off the content for these links. .org-internal-links::after {content:"";} > Is it possible to remove it? You could use a filter to remove empty links just after headings. See ‘org-export-filter-headline-functions’ and ‘org-export-derived-backend-p’. Rasmus -- Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio
[O] ox-html export bug with CUSTOM_ID
This org file (OPTIONS are to keep the exported file clean) - * heading 1 * heading 2 :PROPERTIES: :CUSTOM_ID: my-name :END: exports to --- 1 heading 1 class="section-number-2">2 heading 2 --- The "" for the second heading is unnecessary. Seems to only occur when CUSTOM_ID is set. Deepak
Re: [O] ox-html export bug
The problem is that if you have CSS that decorates links by adding content after a link, that (empty) link gets decorated too. Is it possible to remove it? There is no such empty link for the first heading which does not have CUSTOM_ID set. Deepak On 09/07/2017 10:32 AM, Nicolas Goaziou wrote: Hello, kadal writes: This org file - * heading 1 * heading 2 :PROPERTIES: :CUSTOM_ID: my-name :END: exports to --- 1 heading 1 2 heading 2 --- The "" for the second heading is unnecessary. Seems to only occur when CUSTOM_ID is set. It is the internal reference for "my-name" custom ID. Regards,
Re: [O] ox-html export bug
Hello, kadal writes: > This org file > > - > * heading 1 > * heading 2 > :PROPERTIES: > :CUSTOM_ID: my-name > :END: > > > > exports to > > --- > > 1 heading 1 > > > > class="section-number-2">2 heading 2 > > > > --- > > The "" for the second heading is unnecessary. > Seems to only occur when CUSTOM_ID is set. It is the internal reference for "my-name" custom ID. Regards, -- Nicolas Goaziou
[O] ox-html export bug
This org file - * heading 1 * heading 2 :PROPERTIES: :CUSTOM_ID: my-name :END: exports to --- 1 heading 1 class="section-number-2">2 heading 2 --- The "" for the second heading is unnecessary. Seems to only occur when CUSTOM_ID is set. Deepak