emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] Exporting italic link with bang inside to html fails to parse


From: Ihor Radchenko
Subject: Re: [BUG] Exporting italic link with bang inside to html fails to parse the link [9.5.2 (N/A @ /gnu/store/89yvbijwnvsbpa5h33mvbgh1gy9w30n2-emacs-org-9.5.2/share/emacs/site-lisp/org-9.5.2/)]
Date: Sat, 30 Apr 2022 17:37:49 +0800

"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

> To reproduce:
>
> - create an org-file with the following content:
> /Foo [[https://taz.de/!5843294/][link with a bang]]/
> - M-x org-html-export-to-html
>
> Expected: The HTML-file contains an italic link named "link with a bang".
>
> Actual: The HTML-file contains a broken link with only the domain:
> <i>Foo [[<a href="https://taz.de";>https://taz.de</a></i>!5843294/][link with 
> a bang]]/</p>

Confirmed.
But with a caveat.

Despite intuition, your example can be treated in two ways:
1. <begin italic>/Foo [[https://taz.de<end italic>/!5843294/][link witha bang]]/
2. <begin italic>/Foo <begin link>[[...]]/<end italic>

Org mode always chooses the first case as it prioritise markup that
starts early and ends early.

To force Org mode not treat internal /! as italics ending, you can
insert a zero-width space before "/": <zero width space>/!
So, what you see is not exactly a bug, but non-intuitive behaviour of
Org. (I do not like it, but we have reasons why Org parser behaves this
way).

On the other hand, the example link could be inserted using
org-insert-link.

If one does the following:
1. emacs -Q /tmp/test.org
2. Type "/Begin italic "
3. C-c C-l https://taz.de/!5843294/ <RET> <test> <RET>
4. The inserted text is not a link because the problematic /! is not
   fixed automatically.

I consider the above to be at least a bug in org-insert-link.

Best,
Ihor




reply via email to

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