From 7dc800c213ecec2ea22e36aabe2b78234d9a6099 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 9 Oct 2017 11:20:05 +0800 Subject: [PATCH] Simplify lookaround use in moon.kak (?=[A-Z]\w*) is strictly the same as (?=[A-Z]) as \w* will always at least match an empty string. --- rc/extra/moon.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/extra/moon.kak b/rc/extra/moon.kak index 08e698af..b8ee1b89 100644 --- a/rc/extra/moon.kak +++ b/rc/extra/moon.kak @@ -24,7 +24,7 @@ add-highlighter -group /moon/single_string fill string add-highlighter -group /moon/comment fill comment -add-highlighter -group /moon/code regex ([.\\](?=[A-Za-z]\w*))|(\b[A-Za-z]\w*:)|(\b[A-Za-z]\w*\K!+)|(\W\K[@:][A-Za-z]\w*) 0:variable +add-highlighter -group /moon/code regex ([.\\](?=[A-Za-z]))|(\b[A-Za-z]\w*:)|(\b[A-Za-z]\w*\K!+)|(\W\K[@:][A-Za-z]\w*) 0:variable add-highlighter -group /moon/code regex \b(and|break|catch|class|continue|do|else(if)?|export|extends|false|finally|for|from|if|import|in|local|nil|not|or|return|super|switch|then|true|try|unless|using|when|while|with)\b 0:keyword # Commands