// signature needed by \lyxsout to correctly strike out display math
if (change.type == Change::DELETED && runparams.inDisplayMath
&& !dvipost) {
- if (os.lastChar() == '\n')
+ if (os.blankLine())
str += from_ascii("\\\\\\noindent\n");
else
str += from_ascii("\\\\\\\\\n");
explicit otexstream(odocstream & os)
: otexrowstream(os), canbreakline_(false),
protectspace_(false), terminate_command_(false),
- parbreak_(true), lastchar_(0) {}
+ parbreak_(true), blankline_(true), lastchar_(0) {}
///
void put(char_type const & c);
///
void lastChar(char_type const & c)
{
parbreak_ = (!canbreakline_ && c == '\n');
+ blankline_ = ((!canbreakline_ && c == ' ') || c == '\n');
canbreakline_ = (c != '\n');
lastchar_ = c;
}
char_type lastChar() const { return lastchar_; }
///
bool afterParbreak() const { return parbreak_; }
+ ///
+ bool blankLine() const { return blankline_; }
private:
///
bool canbreakline_;
///
bool parbreak_;
///
+ bool blankline_;
+ ///
char_type lastchar_;
};