commit ef6ccc47c869ce3269be8c2ef002d416834584b9
parent eea2dfce48462927e8a6b6b30a9fbcad1c549861
Author: Hussam al-Homsi <sawuare@gmail.com>
Date: Fri, 6 Aug 2021 18:42:28 -0400
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>
Diffstat:
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/syntax/perl.nanorc b/syntax/perl.nanorc
@@ -20,5 +20,3 @@ color white start="(^use| = new)" end=";"
# Comments.
color green "(^|[[:blank:]])#.*"
-
-color yellow start="<< 'STOP'" end="STOP"
diff --git a/syntax/ruby.nanorc b/syntax/ruby.nanorc
@@ -31,7 +31,5 @@ color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "
# Comments.
color cyan "#[^{].*" "#$"
color brightcyan "##[^{].*" "##$"
-# "Here" docs.
-color green start="<<-?'?EOT'?" end="^EOT"
# Some common markers.
color brightcyan "XXX|TODO|FIXME|\?\?\?"