os << '{';
}
- odocstringstream ourplain;
- InsetText::plaintext(ourplain, runparams);
+ odocstringstream ourlatex;
+ otexstream ots(ourlatex);
+ InsetText::latex(ots, runparams);
if (runparams.for_search) {
// No need for special handling, if we are only searching for some patterns
- os << ourplain.str() << "}";
+ os << ourlatex.str() << "}";
return;
}
// get contents of InsetText as LaTeX and plaintext
- odocstringstream ourlatex;
+ odocstringstream ourplain;
+ InsetText::plaintext(ourplain, runparams);
// FIXME: do Tex/Row correspondence (I don't currently understand what is
// being generated from latexstr below)
- otexstream ots(ourlatex);
- InsetText::latex(ots, runparams);
docstring latexstr = ourlatex.str();
docstring plainstr = ourplain.str();
if (key == "") {
if (sub.str(0)[0] == '\\')
key = sub.str(0)[1];
- else
+ else {
key = sub.str(0);
+ if (key == "$") {
+ size_t k_pos = sub.position(size_t(0));
+ if ((k_pos > 0) && (interval.par[k_pos - 1] == '\\')) {
+ // Escaped '$', ignoring
+ continue;
+ }
+ }
+ }
};
if (evaluatingRegexp) {
if (sub.str(1).compare("endregexp") == 0) {