From 569267b18d763f4d7416414052c2c7e34eaff6a1 Mon Sep 17 00:00:00 2001 From: SeerLite Date: Mon, 11 Jan 2021 13:06:38 -0300 Subject: [PATCH] rc js: Correctly highlight multiline division. --- rc/filetype/javascript.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/filetype/javascript.kak b/rc/filetype/javascript.kak index 5a8d05db..bbea437f 100644 --- a/rc/filetype/javascript.kak +++ b/rc/filetype/javascript.kak @@ -81,7 +81,7 @@ define-command -hidden init-javascript-filetype -params 1 %~ add-highlighter "shared/%arg{1}/comment_line" region // '$' fill comment add-highlighter "shared/%arg{1}/comment" region /\* \*/ fill comment add-highlighter "shared/%arg{1}/shebang" region ^#! $ fill meta - add-highlighter "shared/%arg{1}/division" region '[\w\)\]]\K(/|(\h+/\h+))' '(?=\w)' group # Help Kakoune to better detect /…/ literals + add-highlighter "shared/%arg{1}/division" region '[\w\)\]]\K(/|(\h+/\s+))' '(?=\w)' group # Help Kakoune to better detect /…/ literals add-highlighter "shared/%arg{1}/regex" region / (?][\w:.-]* (?][\w:.-]*(?!\hextends)(?=[\s/>])(?!>\()) (|/>) regions