Commit dcce2b57 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Fix fontification of outdated TeX form

* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-2): End the
expression before the terminating $ in constructions like $\it
(bug#28277). This avoids italicising the final $ character.

This fixes the final $ of the final test case here:

{\it foo}
${\it identifiername}$
$\it identifiername$
parent 170faae3
Pipeline #6339 failed with stage
in 18 seconds
......@@ -593,7 +593,7 @@ An alternative value is \" . \", if you use a font with a narrow period."
;; Miscellany.
(slash "\\\\")
(opt " *\\(\\[[^]]*\\] *\\)*")
(args "\\(\\(?:[^{}&\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")
(args "\\(\\(?:[^${}&\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")
(arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment