From 21846c7dcea663d1f38d6f2a2a50f8d6018320a6 Mon Sep 17 00:00:00 2001 From: thrasr Date: Fri, 22 Mar 2019 16:04:06 -0400 Subject: [PATCH] Fixes ruby syntax highlighting regex The current regex for ruby constants has an error and matches way more than it should. It overwrites the reserved words and most variable names with bright blue - making it hard to read. Change the regex to match exactly 1 of $|@|@@ instead of matching 1 or 0. --- ruby.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.nanorc b/ruby.nanorc index ca4f3a6..bafaa8e 100644 --- a/ruby.nanorc +++ b/ruby.nanorc @@ -6,7 +6,7 @@ header "^#!.*/(env +)?ruby( |$)" ## Asciibetical list of reserved words color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>" ## Constants -color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*" +color brightblue "(\$|@|@@)\<[A-Z]+[0-9A-Z_a-z]*" ## Ruby "symbols" icolor magenta "([ ]|^):[0-9A-Z_]+\>" ## Some unique things we want to stand out