Max Nikulin <maniku...@gmail.com> writes:

>> Confirmed.
>
> Nicolas clearly expressed that it is a feature of the Org parser though.
>
> Moreover, this is a duplicate of another item already tracked on 
> updates.orgmode.org:
>
> 2021-09-03  5:17 Dr. Arne Babenhauserheide Bug: PDF Export of Link fails
> https://list.orgmode.org/87pmtqp79s....@web.de/T/#u
>
> The following markup should be used instead:
>
>      /Foo/ [[https://taz.de/!5843294/][/link with a bang/]]
> ...
>> I consider the above to be at least a bug in org-insert-link.
>
> Timothy suggested to fix `org-insert-link' somehow in than thread.

Yeah. I recall a number of bug report related to this behaviour.
Though I wanted to focus on org-insert-link here.
We can expect users to change the markup if they type a problematic link
manually, but not when specialised functions like org-insert-link are
used. In this scenario, org-insert-link should take care about not
messing up the existing markup.

>> To force Org mode not treat internal /! as italics ending, you can
>> insert a zero-width space before "/": <zero width space>/!
>
> Unfortunately It requires an additional export filter to remove zero 
> width spaces.

Yeah. Right. It should even be an easy patch, which would be welcome :)

> P.S. Actually I like behavior of pandoc
>
>     printf '%s' '/Foo [[https://taz.de/!5843294/][link with a bang]]/' |
>         pandoc -f org -t html
>
>     <p><em>Foo <a href="https://taz.de/!5843294/";>link with a 
> bang</a></em></p>

I also like such behaviour, but it would require multi-pass parsing or
parser tree branching. Nicolas opposed it.

Best,
Ihor

Reply via email to