"Rohit Patnaik" <quanti...@quanticle.net> writes:

> Relatedly, would the refactored fontification also handle nested bold and 
> italic
> text where the delimiters for those are adjacent to one another?

Yes. The idea is to make everything match Org parser.

> Right now, for example:
>
>     /this is italic *and some bold italic*/
>
> is only fontified in Emacs as italic. The portion of the text that is meant to
> be bold does not have the bold property applied. However, if the text is
> exported, e.g. to HTML, the bold and the italic styling are all exported
> correctly.
>
> On the other hand, this:
>
>     /this is italic *and some bold italic* and some more italics/
>
> is fontified correctly in Emacs. I'm guessing that this is because in the 
> first
> example, the regular expression for bold doesn't match, because it has a ~/~
> next to it, while the regular expression for italics matches, as it has
> whitespace after. In the second example, both delimiters have whitespace 
> before
> and after, so both match for their respective texts.

Right. More specifically, approximate regular expression used by the
fontification code does not match in the first example.

The source of truth should be the parser. Try M-: (org-element-context) RET
to see what parser says about markup at point.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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 via email to