else if (lastpos < t.length())
s += t.substr(lastpos, t.length() - lastpos);
// Handle quotes in regex
- // substitute all '„', '“' with '"'
- // and all '‚', '‘' with "\'"
- static std::regex plainquotes { R"(„|“)" };
- static std::regex innerquotes { R"(‚|‘)" };
+ // substitute all '„', '“', '»', '«' with '"'
+ // and all '‚', '‘', '›', '‹' with "\'"
+ static std::regex plainquotes { R"(„|“|»|«)" };
+ static std::regex innerquotes { R"(‚|‘|›|‹)" };
t = std::regex_replace(s, plainquotes, R"(")");
s = std::regex_replace(t, innerquotes, R"(')");
//LYXERR0("correctRegex output '" << s << "'");
// No side effect of file copying and image conversion
runparams.dryrun = true;
if (ignoreFormats.getDeleted())
- runparams.for_searchAdv = OutputParams::SearchWithoutDeleted;
+ runparams.for_search = OutputParams::SearchWithoutDeleted;
else
- runparams.for_searchAdv = OutputParams::SearchWithDeleted;
+ runparams.for_search = OutputParams::SearchWithDeleted;
if (ignoreFormats.getNonContent()) {
- runparams.for_searchAdv |= OutputParams::SearchNonOutput;
+ runparams.for_search |= OutputParams::SearchNonOutput;
}
pit_type const endpit = buffer.paragraphs().size();
for (pit_type pit = 0; pit != endpit; ++pit) {
int option = AS_STR_INSETS |AS_STR_PLAINTEXT;
if (ignoreFormats.getDeleted()) {
option |= AS_STR_SKIPDELETE;
- runparams.for_searchAdv = OutputParams::SearchWithoutDeleted;
+ runparams.for_search = OutputParams::SearchWithoutDeleted;
}
else {
- runparams.for_searchAdv = OutputParams::SearchWithDeleted;
+ runparams.for_search = OutputParams::SearchWithDeleted;
}
if (ignoreFormats.getNonContent()) {
- runparams.for_searchAdv |= OutputParams::SearchNonOutput;
+ runparams.for_search |= OutputParams::SearchNonOutput;
}
string t("");
for (pos_type pit = pos_type(0); pit < (pos_type)buffer.paragraphs().size(); ++pit) {
// 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'
int option = AS_STR_INSETS | AS_STR_PLAINTEXT;
if (ignoreFormats.getDeleted()) {
option |= AS_STR_SKIPDELETE;
- runparams.for_searchAdv = OutputParams::SearchWithoutDeleted;
+ runparams.for_search = OutputParams::SearchWithoutDeleted;
}
else {
- runparams.for_searchAdv = OutputParams::SearchWithDeleted;
+ runparams.for_search = OutputParams::SearchWithDeleted;
}
if (ignoreFormats.getNonContent()) {
- runparams.for_searchAdv |= OutputParams::SearchNonOutput;
+ runparams.for_search |= OutputParams::SearchNonOutput;
}
LYXERR(Debug::FIND, "Stringifying with cur: "
<< cur << ", from pos: " << cur.pos() << ", end: " << end);
// No side effect of file copying and image conversion
runparams.dryrun = true;
if (ignoreFormats.getDeleted()) {
- runparams.for_searchAdv = OutputParams::SearchWithoutDeleted;
+ runparams.for_search = OutputParams::SearchWithoutDeleted;
}
else {
- runparams.for_searchAdv = OutputParams::SearchWithDeleted;
+ runparams.for_search = OutputParams::SearchWithDeleted;
}
if (ignoreFormats.getNonContent()) {
- runparams.for_searchAdv |= OutputParams::SearchNonOutput;
+ runparams.for_search |= OutputParams::SearchNonOutput;
}
if (cur.inTexted()) {