]> git.lyx.org Git - features.git/commitdiff
Remove line in text export of inline math (#9282)
authorScott Kostyshak <skostysh@lyx.org>
Thu, 2 Oct 2014 05:29:00 +0000 (01:29 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Wed, 15 Oct 2014 23:18:46 +0000 (19:18 -0400)
If there is only one row, a new line should not be appended. If
there is more than one row, the new line should not be appended for
the last row.

For example, if in LyX there was "as you can see in $x$ there..." a
copy/paste would lead to a newline after "x".

src/mathed/InsetMathHull.cpp

index 386c373a85537c216c183860a036d84edb825c18..4b9e0ce66f3c6cd632f1be1576dcdb33c2234836 100644 (file)
@@ -1970,7 +1970,8 @@ int InsetMathHull::plaintext(odocstringstream & os,
                        // and do not include the newline.
                        if (op.for_toc || op.for_tooltip || oss.str().size() >= max_length)
                                break;
-                       wi << "\n";
+                        if (r < nrows() - 1)
+                               wi << "\n";
                }
        }
        docstring const str = oss.str();