mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
lang/web: fix Emacs<26 incompatibility #806
The regexp argument for string-trim-right was introduced in 26.1.
This commit is contained in:
@ -38,7 +38,10 @@
|
|||||||
(cl-loop for pair in (cdr alist)
|
(cl-loop for pair in (cdr alist)
|
||||||
unless (string-match-p "^[a-z-]" (cdr pair))
|
unless (string-match-p "^[a-z-]" (cdr pair))
|
||||||
collect (cons (car pair)
|
collect (cons (car pair)
|
||||||
(string-trim-right (cdr pair) "\\(?:>\\|]\\|}\\)+")))))
|
;; TODO Replace with `string-trim-right' (Emacs 26+)
|
||||||
|
(if (string-match "\\(?:>\\|]\\|}\\)+\\'" string)
|
||||||
|
(replace-match "" t t string)
|
||||||
|
string)))))
|
||||||
(setf (alist-get nil web-mode-engines-auto-pairs) nil))
|
(setf (alist-get nil web-mode-engines-auto-pairs) nil))
|
||||||
|
|
||||||
(map! :map web-mode-map
|
(map! :map web-mode-map
|
||||||
|
Reference in New Issue
Block a user