Wrap "words separated by BLANK characters" groups in LaTeX commands

This commit is contained in:
Gerard Vermeulen 2022-09-03 18:42:32 +02:00
parent 1011bba04e
commit bb87c04a71

View File

@ -2262,9 +2262,9 @@ configuration.
#'engrave-faces-latex--protect-content-mathescape
#'engrave-faces-latex--protect-content)
content)))
;; Wrap "words separated by space characters" groups in LaTeX commands.
;; Wrap "words separated by blank characters" groups in LaTeX commands.
;; Do not wrap newlines and other whitespace separating those groups.
(let ((regexp (rx (or (group-n 1 (+ graph ) (* (*? print) (+ graph)))
(let ((regexp (rx (or (group-n 1 (+ graph ) (* (+ blank) (+ graph)))
(group-n 2 (+ (any "\n" space))))))
(slug (when (and style
(eq engrave-faces-latex-output-style 'preset))