org-do-emphasis-faces: Never treat closing marker as next opening marker

* lisp/org.el (org-do-emphasis-faces): Make sure that we never match
ending marker of an emphasis as a beginning marker of another
emphasis.  For example, in "(~-~) test (~+~)" "~) test (~" is a valid
code match unless we move point to the end the first code emphasis
completely during parsing.

Fixes https://orgmode.org/list/87fsujp7mc.fsf@web.de
This commit is contained in:
Ihor Radchenko 2021-10-01 17:47:02 +08:00
parent d19660b05b
commit fa315986a1
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 0 deletions

View File

@ -5113,6 +5113,7 @@ stacked delimiters is N. Escaping delimiters is not possible."
'(invisible t)) '(invisible t))
(add-text-properties (match-beginning 3) (match-end 3) (add-text-properties (match-beginning 3) (match-end 3)
'(invisible t))) '(invisible t)))
(goto-char (match-end 0))
(throw :exit t)))))))) (throw :exit t))))))))
(defun org-emphasize (&optional char) (defun org-emphasize (&optional char)