changeset 100:c432b0708d6d

Fix PHP operators so they don't interfere with object notation
author IBBoard <dev@ibboard.co.uk>
date Mon, 02 Apr 2018 20:04:38 +0100
parents ba9a6a8bb91c
children 845e08259ab0
files nanorc.d/php.nanorc
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/nanorc.d/php.nanorc	Mon Apr 02 19:57:16 2018 +0100
+++ b/nanorc.d/php.nanorc	Mon Apr 02 20:04:38 2018 +0100
@@ -10,9 +10,9 @@
 # Directives and structure.
 color cyan "\<(abstract|as|class|clone|(end)?declare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|static|trait|use|yield)\>"
 color cyan "\<(case|catch|default|do|echo|else(if)?|end(for(each)?|if|switch|while)|final(ly)?|for(each)?|if|print|switch|throw|try|while)\>"
-# Operators.
-color red "&&|\|\||>=?|<=?|===?|!==?|!"
-color normal "[-=]>"
+# Operators - note, we require proper spacing to prevent false positives
+color red "(^|[[:space:]])(&&|\|\||>=?|<=?|===?|!==?)([[:space:]]|$)"
+color red "!"
 
 color magenta "\$this"