From ef6ccc47c869ce3269be8c2ef002d416834584b9 Mon Sep 17 00:00:00 2001 From: Hussam al-Homsi Date: Fri, 6 Aug 2021 18:42:28 -0400 Subject: [PATCH] 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 --- syntax/perl.nanorc | 2 -- syntax/ruby.nanorc | 2 -- 2 files changed, 4 deletions(-) diff --git a/syntax/perl.nanorc b/syntax/perl.nanorc index 5f742fd3..f2747501 100644 --- 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 index 9398b1dd..02de0e64 100644 --- 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|\?\?\?"