Fix of issue when searching at paragraph boundaries when non-ignoring format.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31201 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2009-08-22 16:06:19 +00:00
parent c11f031df6
commit 50c6ba17e5

View File

@ -765,8 +765,8 @@ string MatchStringAdv::normalize(docstring const & s) const
while ((pos = t.find("\n")) != string::npos)
t.replace(pos, 1, " ");
// Remove stale empty \emph{}, \textbf{} and similar blocks from latexify
LYXERR(Debug::FIND, "Removing stale empty \\emph{}, \\textbf{} macros from: " << t);
while (regex_replace(t, t, "\\\\(emph|textbf)(\\{\\})+", ""))
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);
return t;
}