2017-02-19 18:57:16 -05:00
|
|
|
;;; lang/html/autoload/evil.el
|
|
|
|
|
2017-04-22 21:45:14 -04:00
|
|
|
;;;###autoload (autoload '+web:encode-html-entities "lang/web/autoload/evil" nil t)
|
|
|
|
(evil-define-operator +web:encode-html-entities (beg end &optional input)
|
2017-02-19 18:57:16 -05:00
|
|
|
"Encodes HTML entities in the selected region."
|
|
|
|
(interactive "<r><a>")
|
|
|
|
(cond (input
|
2017-04-22 21:45:14 -04:00
|
|
|
(insert (+web-encode-entities input)))
|
2017-02-19 18:57:16 -05:00
|
|
|
((and beg end)
|
2017-04-22 21:45:14 -04:00
|
|
|
(+web/encode-entities-region beg end))))
|
2017-02-19 18:57:16 -05:00
|
|
|
|
2017-04-22 21:45:14 -04:00
|
|
|
;;;###autoload (autoload '+web:decode-html-entities "lang/web/autoload/evil" nil t)
|
|
|
|
(evil-define-operator +web:decode-html-entities (beg end &optional input)
|
2017-02-19 18:57:16 -05:00
|
|
|
"Decodes HTML entities in the selected region."
|
|
|
|
(interactive "<r><a>")
|
|
|
|
(cond (input
|
2017-04-22 21:45:14 -04:00
|
|
|
(insert (+web-decode-entities input)))
|
2017-02-19 18:57:16 -05:00
|
|
|
((and beg end)
|
2017-04-22 21:45:14 -04:00
|
|
|
(+web/decode-entities-region beg end))))
|
2017-02-19 18:57:16 -05:00
|
|
|
|