]> git.lyx.org Git - features.git/blobdiff - src/lyxfind.cpp
FindAdv: Handling of '%' in searched string while not ignoring format
[features.git] / src / lyxfind.cpp
index 6ef7cd3b62c7fa140b0951a3eab05f0a84c49c9f..015e437b492c9b4a378514adc05b114bf794dcba 100644 (file)
@@ -3878,14 +3878,9 @@ string MatchStringAdv::normalize(docstring const & s, bool ignore_format) const
        // Remove \n at begin
        while (!t.empty() && t[0] == '\n')
                t = t.substr(1);
-       // Remove [%]*\n at end
+       // Remove \n* at end
        while (!t.empty() && t[t.size() - 1] == '\n') {
-               size_t count = 1;
-               if (!ignore_format) {
-                       while ((t.size() > 1 + count) && (t[t.size() - 1 - count] == '%'))
-                               count++;
-               }
-               t = t.substr(0, t.size() - count);
+               t = t.substr(0, t.size() - 1);
        }
        size_t pos;
        // Handle all other '\n'