syntax: perl: avoid recognizing embedded hash signs as a comment starter

Require that a comment starts at the start of a line or is preceded by
whitespace.  This prevents most hash signs used for other purposes (and
what follows them) getting colored as comments.
master
Benno Schulenberg 2019-08-08 12:08:34 +02:00
parent 1e3f3a7511
commit ee91c51e09
1 changed files with 4 additions and 1 deletions

View File

@ -11,5 +11,8 @@ icolor cyan start="[$@%]" end="( |[^0-9A-Z_]|-)"
color yellow "".*"|qq\|.*\|"
color white "[sm]/.*/"
color white start="(^use| = new)" end=";"
color green "#.*"
# Comments.
color green "(^|[[:space:]])#.*"
color yellow start="<< 'STOP'" end="STOP"