summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Schick <matt@schickm.com>2018-09-23 19:41:08 -0500
committerMatt Schick <matt@schickm.com>2018-10-02 06:09:14 -0500
commit1d731dbdd0d8b70614ea9abaffb6676532d3df87 (patch)
tree83f0d9b9753e91e84d063a1798040e44ae1fbd6b
parent551021d6e5360c48c0d08da6464a2ee4081bb3d8 (diff)
Fix/improve html-indent-on-new-line
* Fixes erroring execute-keys statement by using '<lt>' rather then '<' * Reworks hook to not indent after self closing tags
-rw-r--r--rc/base/html.kak3
1 files changed, 1 insertions, 2 deletions
diff --git a/rc/base/html.kak b/rc/base/html.kak
index aa3fe740..ecf330f1 100644
--- a/rc/base/html.kak
+++ b/rc/base/html.kak
@@ -51,8 +51,7 @@ define-command -hidden html-indent-on-new-line %{
# filter previous line
try %{ execute-keys -draft k : html-filter-around-selections <ret> }
# indent after lines ending with opening tag
- try %{ execute-keys -draft k <a-x> <a-k> <[^/][^>]+>$ <ret> j <a-gt> }
- }
+ try %{ execute-keys -draft k <a-x> <a-k> <lt>(?!area)(?!base)(?!br)(?!col)(?!command)(?!embed)(?!hr)(?!img)(?!input)(?!keygen)(?!link)(?!menuitem)(?!meta)(?!param)(?!source)(?!track)(?!wbr)(?!/)(?!>)[a-zA-Z0-9_-]+[^>]*?>$ <ret> j <a-gt> } }
}
# Initialization