mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 17:55:56 +08:00
GCode find/replace: Another try to make a sensible "default" behavior
with the boost::regex implementation: With no "single line", don't accept new lines with a dot '.'.
This commit is contained in:
parent
e83d89dee7
commit
9828abb443
@ -118,7 +118,7 @@ std::string GCodeFindReplace::process_layer(const std::string &ain)
|
|||||||
temp.reserve(in->size());
|
temp.reserve(in->size());
|
||||||
boost::regex_replace(ToStringIterator(temp), in->begin(), in->end(),
|
boost::regex_replace(ToStringIterator(temp), in->begin(), in->end(),
|
||||||
substitution.regexp_pattern, substitution.format,
|
substitution.regexp_pattern, substitution.format,
|
||||||
(substitution.single_line ? boost::match_single_line | boost::match_default : boost::match_default) | boost::format_all);
|
(substitution.single_line ? boost::match_single_line | boost::match_default : boost::match_not_dot_newline | boost::match_default) | boost::format_all);
|
||||||
std::swap(out, temp);
|
std::swap(out, temp);
|
||||||
} else {
|
} else {
|
||||||
if (in == &ain)
|
if (in == &ain)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user