emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] incorrect HTML export with italic link containing an exclamation mark (!) [9.7.10 (N/A @ /gnu/store/icgsji9268qh5fxlrw0xh8775nbark3v-emacs-org-9.7.10/share/emacs/site-lisp/org-9.7.10/)]
Date: Sat, 07 Sep 2024 17:58:41 +0000	[thread overview]
Message-ID: <875xr7e46m.fsf@localhost> (raw)
In-Reply-To: <87ikve646h.fsf@web.de>

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

> When a link within italic text contains an exclamation mark, the link
> text is not included in the link. Instead the [[ ]] are shown in the
> export and only the raw link is turned into a link.
>
> to reproduce:
>
> - Create an org-mode file containing
>   /Test [[https://example.com/foo/!bar][Link]]/
> - Export to HTML (C-c C-e h H)
>
> Expected: a HTML buffer containing:
> <p>
> <i>Test <a href="https://example.com/foo/!bar">Link</a></i></p>
> (the same as without italic markers, just wrapped in <i></i>)
>
> Actual: a HTML buffer containing:
> <p>
> <i>Test [[<a href="https://example.com/foo">https://example.com/foo</a></i>!bar][Link]]/</p>

This is not exactly a bug - you are just running into an edge case in
the syntax. In Org mode, the first matching markup "wins":

<begin italics>/Test [[https://example.com/foo/</end italics>  !bar][Link]]/

"fixing" this would require changes to syntax.

If there is a bug, it is in the fontification, which inaccurately
displays link where there is none.

For fontification, see https://orgmode.org/list/87ee7c9quk.fsf@localhost
For such edge cases in syntax, see https://orgmode.org/list/875xwqj4tl.fsf@localhost

Canceled, as duplicate.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


      reply	other threads:[~2024-09-07 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02  5:00 [BUG] incorrect HTML export with italic link containing an exclamation mark (!) [9.7.10 (N/A @ /gnu/store/icgsji9268qh5fxlrw0xh8775nbark3v-emacs-org-9.7.10/share/emacs/site-lisp/org-9.7.10/)] Dr. Arne Babenhauserheide
2024-09-07 17:58 ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875xr7e46m.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=arne_bab@web.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).