preview/plaintorich: add <br> tags at end of text/plain lines instead of using <pre> tag (allows line wrapping).
This commit is contained in:
@@ -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--;
|
||||
}
|
||||
|
||||
@@ -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_ */
|
||||
|
||||
Reference in New Issue
Block a user