From 7441f42967fa04411f1a9b99612aba726cf401b2 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 25 Jul 2020 16:09:20 -0700 Subject: [PATCH] Plugins/Plang: Output final String value as string literal --- Plugins/Plang.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Plugins/Plang.pm b/Plugins/Plang.pm index 9a2b89ca..db191679 100644 --- a/Plugins/Plang.pm +++ b/Plugins/Plang.pm @@ -82,7 +82,13 @@ sub cmd_plang { my $result = $self->{plang}->interpret_string($context->{arguments}); # check to see if we need to append final result to output - $self->{output} .= $self->{plang}->{interpreter}->output_value($result) if defined $result->[1]; + if (defined $result->[1]) { + if ($result->[0] eq 'STRING') { + $self->{output} .= $self->{plang}->{interpreter}->output_string_literal($result->[1]); + } else { + $self->{output} .= $self->{plang}->{interpreter}->output_value($result); + } + } # return the output return length $self->{output} ? $self->{output} : "No output.";