]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Make the fake sequence for braces highly unlikely (addressing #6478).
[lyx.git] / src / lyxfind.cpp
index 88c9461a38bfcc9a75ac1bf565cdb8f32ea4efb0..0f36ca3c82bbb9269f538ec886095362eb2a77cf 100644 (file)
@@ -805,6 +805,8 @@ string MatchStringAdv::normalize(docstring const & s) const
        LYXERR(Debug::FIND, "Removing stale empty \\emph{}, \\textbf{}, \\*section{} macros from: " << t);
        while (regex_replace(t, t, "\\\\(emph|textbf|subsubsection|subsection|section|subparagraph|paragraph)(\\{\\})+", ""))
                LYXERR(Debug::FIND, "  further removing stale empty \\emph{}, \\textbf{} macros from: " << t);
+       regex_replace(t, t, "\\{", "@##£$%@(");
+       regex_replace(t, t, "\\}", "@##£$%@)");
        return t;
 }