浏览代码

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
Ihor Radchenko 3 年之前
父节点
当前提交
fa315986a1
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      lisp/org.el

+ 1 - 0
lisp/org.el

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