[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Remove arbitrary syntax highlighting of heredocs in Perl and Ruby
From: |
Benno Schulenberg |
Subject: |
Re: Remove arbitrary syntax highlighting of heredocs in Perl and Ruby |
Date: |
Mon, 9 Aug 2021 10:08:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
Op 07-08-2021 om 02:29 schreef Hussam al-Homsi:
> Correct syntax highlighting would at least require checking the same
> identifier twice, which is not possible with nano regexes as far as I
> know.
I hesitated about removing these coloring rules. But seeing that the
Perl docs use mostly EOF and not STOP as end marker in their examples,
and that the syntax rule uses quotes around STOP and a space before it...
I realize that this rule is too unusual, /and/ far too limited: it does
not account for double quotes or backticks or a tilde either.
The same goes for the Ruby rule -- plus it would wrongly color <<'EOT
(with a missing quote) as a valid here document.
> For each language, I attached a patch that has some explanation and a
> reference.
Thanks. I've folded the two patches into one and applied it.
Benno
OpenPGP_signature
Description: OpenPGP digital signature