syntax: perl, ruby: remove arbitrary highlighting of here documents
The rules assume that 'STOP' (for Perl) or EOT (for Ruby) is the terminating string while it could be anything. Also, the rules don't take quotes nor backticks nor a tilde into account. In short: these coloring rules are far too limited. References: https://perldoc.perl.org/perlop#%3C%3CEOF https://docs.ruby-lang.org/en/3.0.0/doc/syntax/literals_rdoc.html#label-Here+Documents+-28heredocs-29 Signed-off-by: Hussam al-Homsi <sawuare@gmail.com>master
parent
eea2dfce48
commit
ef6ccc47c8
|
@ -20,5 +20,3 @@ color white start="(^use| = new)" end=";"
|
||||||
|
|
||||||
# Comments.
|
# Comments.
|
||||||
color green "(^|[[:blank:]])#.*"
|
color green "(^|[[:blank:]])#.*"
|
||||||
|
|
||||||
color yellow start="<< 'STOP'" end="STOP"
|
|
||||||
|
|
|
@ -31,7 +31,5 @@ color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "
|
||||||
# Comments.
|
# Comments.
|
||||||
color cyan "#[^{].*" "#$"
|
color cyan "#[^{].*" "#$"
|
||||||
color brightcyan "##[^{].*" "##$"
|
color brightcyan "##[^{].*" "##$"
|
||||||
# "Here" docs.
|
|
||||||
color green start="<<-?'?EOT'?" end="^EOT"
|
|
||||||
# Some common markers.
|
# Some common markers.
|
||||||
color brightcyan "XXX|TODO|FIXME|\?\?\?"
|
color brightcyan "XXX|TODO|FIXME|\?\?\?"
|
||||||
|
|
Loading…
Reference in New Issue