Explorar o código

org.el (org-do-latex-and-related): Fix duplicate 'latex faces

* lisp/org.el (org-do-latex-and-related): Do not add a
'org-latex-and-related face beyond the fontification limit.
Sébastien Miquel %!s(int64=4) %!d(string=hai) anos
pai
achega
36622362d1
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      lisp/org.el

+ 2 - 0
lisp/org.el

@@ -5487,6 +5487,8 @@ highlighting was done, nil otherwise."
 	(while (and (< (point) limit)
 		    (re-search-forward org-latex-and-related-regexp nil t))
 	  (cond
+           ((>= (match-beginning 0) limit)
+	    (throw 'found nil))
 	   ((cl-some (lambda (f)
 		       (memq f '(org-code org-verbatim underline
 					  org-special-keyword)))