mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/web: fix {en,de}code-html-entities commands
This commit is contained in:
3
TODO.org
3
TODO.org
@ -1,6 +1,6 @@
|
|||||||
#+TITLE: DOOM Emacs Changelog
|
#+TITLE: DOOM Emacs Changelog
|
||||||
|
|
||||||
** Unreleased [36/48]
|
** Unreleased [37/49]
|
||||||
+ [-] app/finance
|
+ [-] app/finance
|
||||||
+ [-] app/crm
|
+ [-] app/crm
|
||||||
+ [-] Improve send-to-REPL workflow
|
+ [-] Improve send-to-REPL workflow
|
||||||
@ -12,6 +12,7 @@
|
|||||||
+ [ ] New (tools/upload): add ~+upload/open-remote-file~ command
|
+ [ ] New (tools/upload): add ~+upload/open-remote-file~ command
|
||||||
+ [ ] Fix 0/0 modeline display (caused by leftover anzu state)
|
+ [ ] Fix 0/0 modeline display (caused by leftover anzu state)
|
||||||
+ [ ] Fix snippet-mode detection in snippets
|
+ [ ] Fix snippet-mode detection in snippets
|
||||||
|
+ [X] lang/web: fix HTML encode/decode entities commands
|
||||||
+ [X] Fix ~+vcs/git-browse~ & ~+vcs/git-browse-issues~
|
+ [X] Fix ~+vcs/git-browse~ & ~+vcs/git-browse-issues~
|
||||||
+ [7/9] lang/org
|
+ [7/9] lang/org
|
||||||
+ [ ] Add bootstrap to install latex tools :new:
|
+ [ ] Add bootstrap to install latex tools :new:
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
;;; lang/html/autoload/evil.el
|
;;; lang/html/autoload/evil.el
|
||||||
|
|
||||||
;;;###autoload (autoload '+html:encode-html-entities "lang/html/autoload/evil" nil t)
|
;;;###autoload (autoload '+web:encode-html-entities "lang/web/autoload/evil" nil t)
|
||||||
(evil-define-operator +html:encode-html-entities (beg end &optional input)
|
(evil-define-operator +web:encode-html-entities (beg end &optional input)
|
||||||
"Encodes HTML entities in the selected region."
|
"Encodes HTML entities in the selected region."
|
||||||
(interactive "<r><a>")
|
(interactive "<r><a>")
|
||||||
(cond (input
|
(cond (input
|
||||||
(insert (+html-encode-entities input)))
|
(insert (+web-encode-entities input)))
|
||||||
((and beg end)
|
((and beg end)
|
||||||
(+html/encode-entities-region beg end))))
|
(+web/encode-entities-region beg end))))
|
||||||
|
|
||||||
;;;###autoload (autoload '+html:decode-html-entities "lang/html/autoload/evil" nil t)
|
;;;###autoload (autoload '+web:decode-html-entities "lang/web/autoload/evil" nil t)
|
||||||
(evil-define-operator +html:decode-html-entities (beg end &optional input)
|
(evil-define-operator +web:decode-html-entities (beg end &optional input)
|
||||||
"Decodes HTML entities in the selected region."
|
"Decodes HTML entities in the selected region."
|
||||||
(interactive "<r><a>")
|
(interactive "<r><a>")
|
||||||
(cond (input
|
(cond (input
|
||||||
(insert (+html-decode-entities input)))
|
(insert (+web-decode-entities input)))
|
||||||
((and beg end)
|
((and beg end)
|
||||||
(+html/decode-entities-region beg end))))
|
(+web/decode-entities-region beg end))))
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
;; Editing
|
;; Editing
|
||||||
(ex! "@" '+evil:macro-on-all-lines) ; TODO Test me
|
(ex! "@" '+evil:macro-on-all-lines) ; TODO Test me
|
||||||
(ex! "date" '+text:insert-date)
|
(ex! "date" '+text:insert-date)
|
||||||
(ex! "enhtml" '+hlissner:encode-html-entities)
|
(ex! "enhtml" '+web:encode-html-entities)
|
||||||
(ex! "dehtml" '+hlissner:decode-html-entities)
|
(ex! "dehtml" '+web:decode-html-entities)
|
||||||
(ex! "ie[dit]" 'evil-multiedit-ex-match)
|
(ex! "ie[dit]" 'evil-multiedit-ex-match)
|
||||||
(ex! "na[rrow]" '+hlissner:narrow-buffer)
|
(ex! "na[rrow]" '+hlissner:narrow-buffer)
|
||||||
(ex! "ref[actor]" 'emr-show-refactor-menu)
|
(ex! "ref[actor]" 'emr-show-refactor-menu)
|
||||||
|
Reference in New Issue
Block a user