From 88f38e87e6db68dd867698e5af2c360ca5b14c4a Mon Sep 17 00:00:00 2001 From: Mark-Weston Date: Sun, 5 Aug 2018 01:07:44 +0300 Subject: [PATCH] Fix Lua syntax 1. Add missing operator: ... 2. Color strings before comments --- syntax/lua.nanorc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/syntax/lua.nanorc b/syntax/lua.nanorc index a125d1bd..b0993d4c 100644 --- a/syntax/lua.nanorc +++ b/syntax/lua.nanorc @@ -10,7 +10,7 @@ comment "--" color brightwhite "\[\[.*\]\]" # Operators -color brightyellow ":|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|\<(not|and|or)\>" +color brightyellow ":|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|\.\.\.|#|\<(not|and|or)\>" # Statements color brightblue "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return|break)\>" @@ -49,9 +49,9 @@ color brightmagenta "\(|\)|\[|\]|\{|\}" # Shebang color brightcyan "^#!.*" +# Strings +color red ""(\\.|[^"\])*"|'(\\.|[^'\])*'" + # Simple comments and multiline comments color green "--.*" color green start="--\[\[" end="\]\]" - -# Strings -color red ""(\\.|[^"\])*"|'(\\.|[^'\])*'" -- 2.18.0