if (lastpos == s.size())
break;
}
- size_t end_pos = s.find("\\endregexp{}}", regex_pos + 8);
+ size_t end_pos = s.find("\\endregexp{", regex_pos + 8);
result += correctRegex(s.substr(regex_pos + 8, end_pos -(regex_pos + 8)), withformat);
lastpos = end_pos + 13;
}
string lead_as_regexp;
if (lead_size > 0) {
lead_as_regexp = string2regex(par_as_string.substr(0, lead_size));
+ (void)regex_replace(par_as_string_nolead, par_as_string_nolead, "\\$$", "");
(void)regex_replace(par_as_string_nolead, par_as_string_nolead, "}$", "");
par_as_string = par_as_string_nolead;
LYXERR(Debug::FIND, "lead_as_regexp is '" << lead_as_regexp << "'");
odocstringstream oss;
otexrowstream ots(oss);
Encoding const * const enc = encodings.fromLyXName("utf8");
- TeXMathStream wi(ots, false, true, TeXMathStream::wsDefault, enc);
+ TeXMathStream::OutputType ot;
+ if (op.for_searchAdv == OutputParams::NoSearch)
+ ot = TeXMathStream::wsDefault;
+ else
+ ot = TeXMathStream::wsSearchAdv;
// Fix Bug #6139
- if (type_ == hullRegexp)
+ if (type_ == hullRegexp) {
+ TeXMathStream wi(ots, false, true, ot, enc);
write(wi);
+ }
else {
+ TeXMathStream wi(ots, false, true, ot, enc);
for (row_type r = 0; r < nrows(); ++r) {
for (col_type c = 0; c < ncols(); ++c)
wi << (c == 0 ? "" : "\t") << cell(index(r, c));
void InsetMathNest::latex(otexstream & os, OutputParams const & runparams) const
{
- TeXMathStream wi(os, runparams.moving_arg, true,
- runparams.dryrun ? TeXMathStream::wsDryrun : TeXMathStream::wsDefault,
+ TeXMathStream::OutputType ot;
+ if (runparams.for_searchAdv != OutputParams::NoSearch)
+ ot = TeXMathStream::wsSearchAdv;
+ else if (runparams.dryrun)
+ ot = TeXMathStream::wsDryrun;
+ else
+ ot = TeXMathStream::wsDefault;
+ TeXMathStream wi(os, runparams.moving_arg, true, ot,
runparams.encoding);
wi.strikeoutMath(runparams.inDeletedInset);
if (runparams.inulemcmd) {
os << (os.asciiOnly() ? escape(s) : s);
return;
}
+ else if (os.output() == TeXMathStream::wsSearchAdv) {
+ os << s;
+ return;
+ }
if (os.lockedMode()) {
bool space;
enum OutputType {
wsDefault,
wsDryrun,
- wsPreview
+ wsPreview,
+ wsSearchAdv
};
///
enum UlemCmdType {