yasnippet.el (yas-escape-text): No error on nil text

This commit is contained in:
Noam Postavsky 2016-07-05 23:39:07 -04:00
parent 42b0c269ca
commit 7661dc161d

View File

@ -1916,7 +1916,8 @@ prefix argument."
(defun yas-escape-text (text) (defun yas-escape-text (text)
"Escape TEXT for snippet." "Escape TEXT for snippet."
(replace-regexp-in-string "[\\$]" "\\\\\\&" text)) (when text
(replace-regexp-in-string "[\\$]" "\\\\\\&" text)))
;;; Snippet compilation function ;;; Snippet compilation function