mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
Small fix to ert compatibility read where white spaces where removed when
effectively they were needed. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@4177 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
de8a85e89a
commit
8976e585b6
@ -1,3 +1,8 @@
|
||||
2002-05-21 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* buffer.C (insertErtContents): fix to insert ert asis if it is
|
||||
non empty. Skip it completely if it contains only whitespaces.
|
||||
|
||||
2002-05-15 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* BufferView_pimpl.C:
|
||||
|
@ -418,8 +418,10 @@ Inset * Buffer::isErtInset(Paragraph * par, int pos) const
|
||||
|
||||
void Buffer::insertErtContents(Paragraph * par, int & pos, bool set_inactive)
|
||||
{
|
||||
string str = frontStrip(strip(ert_comp.contents, ' '), ' ');
|
||||
if (!str.empty()) {
|
||||
if (ert_comp.contents.find_first_not_of(' ') != string::npos) {
|
||||
// we only skip completely empty ERT (only spaces) otherwise
|
||||
// we have to insert it as is.
|
||||
string str(ert_comp.contents);
|
||||
lyxerr[Debug::INSETS] << "ERT contents:\n'"
|
||||
<< str << "'" << endl;
|
||||
// check if we have already an ert inset a position earlier
|
||||
|
Loading…
x
Reference in New Issue
Block a user