Re: [PATCH 3/4] tests: drop here-doc check from internal chain-linter
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 29, 2023, 04:02 UTC
- Message-ID
- <CAPig+cRH8Ca+s9zpmEx4O2v4q2s2Mqr2Axm_ryMan742da-KmA@mail.gmail.com>
- In-Reply-To
- <CAPig+cQiOGrDSUc34jHEBp87Rx-dnXNcPcF76bu0SJoOzD+1hw@mail.gmail.com>
On Tue, Mar 28, 2023 at 11:46 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 8 quoted lines
> The attached patch seems to do the job. Apologies for Gmail messing up
> the whitespace. It's also attached to the email.
>
> $tag =~ s/['"\\]//g;
> - push(@{$self->{heretags}}, $indented ? "\t$tag" : "$tag");
> + $$token[0] = "\t$tag" if $indented;
> + push(@{$self->{heretags}}, $token);
> return "<<$indented$tag";Bah, the `$$token[0] = ...` line is incorrect. It should be:
$$token[0] = $indented ? "\t$tag" : "$tag";
which more correctly matches the original code. Without this fix, $$token[0] only gets the cleaned tag name in the `<<-EOF` case but not in the plain `<<EOF` case.