From efcf5addea13a0c2febde8858f1f534dacfad42c Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 24 Oct 2012 00:42:56 -0400 Subject: Remove only newlines in substitution var values. --- (limited to 'lib') diff --git a/lib/control.sh b/lib/control.sh index 2e87248..196d952 100644 --- a/lib/control.sh +++ b/lib/control.sh @@ -159,8 +159,8 @@ ob_set_substvar() H; # Store each input line in the hold space. ${ # At the last line of input, … g; # … restore the hold space into the pattern space, … - s/^[ \t\n]*//; # … remove leading whitespace, … - s/[ \t\n]*$//; # … remove trailing whitespace, and … + s/^[\n]*//; # … remove leading newline characters, … + s/[\n]*$//; # … remove trailing newline characters, and … p; # … print the results. }; ')" -- cgit v0.9.1