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.
This commit is contained in:
thrasr 2019-03-22 16:04:06 -04:00
parent ee21b12aa3
commit 21846c7dce

View File

@ -6,7 +6,7 @@ header "^#!.*/(env +)?ruby( |$)"
## Asciibetical list of reserved words ## 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)\>" 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 ## Constants
color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*" color brightblue "(\$|@|@@)\<[A-Z]+[0-9A-Z_a-z]*"
## Ruby "symbols" ## Ruby "symbols"
icolor magenta "([ ]|^):[0-9A-Z_]+\>" icolor magenta "([ ]|^):[0-9A-Z_]+\>"
## Some unique things we want to stand out ## Some unique things we want to stand out