From bad18055face557fad5c437ad4501c3e899fda30 Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Sun, 31 Dec 2017 04:29:22 +0000 Subject: [PATCH 4/6] syntax: lua: remove redundant backslashes from string regex 1. Backslashes inside bracket expressions "[...]" lose their special meaning so they don't need to be doubled. 2. From doc/nanorc.5: "Quotes inside these string parameters don't have to be escaped with backslashes. The last double quote in the string will be treated as its end." So \" should be changed to ". Signed-off-by: Tom Levy --- syntax/lua.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/lua.nanorc b/syntax/lua.nanorc index 400d79d5..7f0a4e50 100644 --- a/syntax/lua.nanorc +++ b/syntax/lua.nanorc @@ -57,7 +57,7 @@ color green "\-\-.*$" color green start="\-\-\[\[" end="\]\]" # Strings -color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'" +color red ""(\\.|[^"\])*"|'(\\.|[^'\])*'" ##color red start="\[\[" end="\]\]" # Hex literals -- 2.11.0