From 1d731dbdd0d8b70614ea9abaffb6676532d3df87 Mon Sep 17 00:00:00 2001 From: Matt Schick Date: Sun, 23 Sep 2018 19:41:08 -0500 Subject: [PATCH] Fix/improve html-indent-on-new-line * Fixes erroring execute-keys statement by using '' rather then '<' * Reworks hook to not indent after self closing tags --- rc/base/html.kak | 3 +-- 1 file changed, 1 insertion(+), 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 } # indent after lines ending with opening tag - try %{ execute-keys -draft k <[^/][^>]+>$ j } - } + try %{ execute-keys -draft k (?!area)(?!base)(?!br)(?!col)(?!command)(?!embed)(?!hr)(?!img)(?!input)(?!keygen)(?!link)(?!menuitem)(?!meta)(?!param)(?!source)(?!track)(?!wbr)(?!/)(?!>)[a-zA-Z0-9_-]+[^>]*?>$ j } } } # Initialization