preview/plaintorich: add <br> tags at end of text/plain lines instead of using <pre> tag (allows line wrapping).

This commit is contained in:
Jean-Francois Dockes
2011-03-08 19:12:00 +01:00
parent 43230c1c60
commit 7eb7bd52bb
5 changed files with 19 additions and 4 deletions
+2
View File
@@ -435,6 +435,8 @@ bool PlainToRich::plaintorich(const string& in,
if (eol > 2)
eol = 2;
while (eol) {
if (!m_inputhtml && m_eolbr)
*olit += "<br>";
*olit += "\n";
eol--;
}
+2
View File
@@ -89,6 +89,8 @@ public:
protected:
static const string snull;
bool m_inputhtml;
// Use <br> to break plain text lines (else caller has used a <pre> tag)
bool m_eolbr;
};
#endif /* _PLAINTORICH_H_INCLUDED_ */