mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 21:27:52 -06:00
Fix of the new PlaceholderParser: Maintain whitespaces and new lines.
This commit is contained in:
parent
571d654e67
commit
b54a15faa2
2 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
use Test::More tests => 39;
|
use Test::More tests => 40;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
|
@ -55,6 +55,9 @@ use Slic3r::Test;
|
||||||
is $parser->process('{temperature[foo]}'),
|
is $parser->process('{temperature[foo]}'),
|
||||||
$config->temperature->[0],
|
$config->temperature->[0],
|
||||||
"array reference";
|
"array reference";
|
||||||
|
is $parser->process("test [ temperature_ [foo] ] \n hu"),
|
||||||
|
"test " . $config->temperature->[0] . " \n hu",
|
||||||
|
"whitespaces and newlines are maintained";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -641,7 +641,7 @@ namespace client
|
||||||
|
|
||||||
// Free-form text up to a first brace, including spaces and newlines.
|
// Free-form text up to a first brace, including spaces and newlines.
|
||||||
// The free-form text will be inserted into the processed text without a modification.
|
// The free-form text will be inserted into the processed text without a modification.
|
||||||
text = raw[no_skip[+(char_ - '[' - '{')]];
|
text = no_skip[raw[+(char_ - '[' - '{')]];
|
||||||
text.name("text");
|
text.name("text");
|
||||||
|
|
||||||
// New style of macro expansion.
|
// New style of macro expansion.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue