From 9828abb44310ee259c639b5042308bfbf70801c1 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Wed, 26 Jan 2022 13:57:30 +0100 Subject: [PATCH] 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 '.'. --- src/libslic3r/GCode/FindReplace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/GCode/FindReplace.cpp b/src/libslic3r/GCode/FindReplace.cpp index e9c9a97d08..9f9852f048 100644 --- a/src/libslic3r/GCode/FindReplace.cpp +++ b/src/libslic3r/GCode/FindReplace.cpp @@ -118,7 +118,7 @@ std::string GCodeFindReplace::process_layer(const std::string &ain) temp.reserve(in->size()); boost::regex_replace(ToStringIterator(temp), in->begin(), in->end(), 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); } else { if (in == &ain)