emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Tom Alexander <tom@fizz.buzz>, emacs-orgmode@gnu.org
Subject: Re: Inconsistent text markup handling when double-nesting markers
Date: Wed, 11 Oct 2023 19:16:37 +0700	[thread overview]
Message-ID: <d0071071-63e6-465f-bf8a-b76ccff8a992@gmail.com> (raw)
In-Reply-To: <87wmvt7c5k.fsf@localhost>

On 11/10/2023 16:15, Ihor Radchenko wrote:
> Max Nikulin <manikulin@gmail.com> writes:
> 
>> Isn't nested bold for "**bold**" a bug? Generally it is not allowed and
>>
>>        *b1 *b2* b3*
>>
>> is parsed as bold only for "b1 *b2".
> 
> No, **bold** it is not a bug. The parser is recursive with inner markup
> not "seeing" its parent. So, we first parse the outer bold and then
> continue parsing the contents separately, as *bold*.

I just find the following rather confusing:

(org-export-string-as "**bold**" 'html t)
"<p>\n<b><b>bold</b></b></p>\n"
(org-export-string-as "**inner* outer*" 'html t)
"<p>\n<b>*inner</b> outer*</p>\n"
(org-export-string-as "*outer *inner**" 'html t)
"<p>\n<b>outer <b>inner</b></b></p>\n"
(org-export-string-as "*begin *inner* end*" 'html t)
"<p>\n<b>begin *inner</b> end*</p>\n"

> Be it another way, /*bold italic*/ would also not be allowed as
> we demand bol, whitespace, -, (, {, ', or " before the markup:
> https://orgmode.org/worg/org-syntax.html#Emphasis_Markers

Certainly /*b*/ should work, but nested bold was a surprise for me. I 
believed that nesting is strictly prohibited. The case of underscores is 
even more tricky due to ambiguity of underline and subscript.

P.S. Juan Manuel at certain moment discovered that pandoc allows nesting 
for *b1 *b2* b3*.




  reply	other threads:[~2023-10-11 12:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09 23:02 Inconsistent text markup handling when double-nesting markers Tom Alexander
2023-10-10 12:07 ` Ihor Radchenko
2023-10-11  2:23   ` Max Nikulin
2023-10-11  9:15     ` Ihor Radchenko
2023-10-11 12:16       ` Max Nikulin [this message]
2023-10-11 12:26         ` Ihor Radchenko
2023-10-11 14:40           ` Tom Alexander
2023-10-12 10:23           ` Max Nikulin
2023-10-12 12:04             ` Ihor Radchenko

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=d0071071-63e6-465f-bf8a-b76ccff8a992@gmail.com \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tom@fizz.buzz \
    --cc=yantar92@posteo.net \
    /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).