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.
This commit is contained in:
Sébastien Miquel 2021-03-19 16:55:27 +01:00 committed by Kyle Meyer
parent 478929ae61
commit 36622362d1
1 changed files with 2 additions and 0 deletions

View File

@ -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)))