# HG changeset patch # User IBBoard # Date 1522695878 -3600 # Node ID c432b0708d6defc198fe9bf44f578b8e585c43fb # Parent ba9a6a8bb91c0f1e33e24222556c2a80efe956ed Fix PHP operators so they don't interfere with object notation diff -r ba9a6a8bb91c -r c432b0708d6d nanorc.d/php.nanorc --- 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"