If a posting comment is very short, let it hang

This applies when using the "print" report, or the "comment" variable.
This commit is contained in:
John Wiegley 2009-06-14 18:26:26 +01:00
parent 8747c724f1
commit 0e64207757

View file

@ -258,10 +258,12 @@ value_t get_comment(item_t& item)
if (! item.note) {
return string_value("");
} else {
// jww (2009-03-01): If the comment is a short one-liner, put it at the
// end of the post/xact
std::ostringstream buf;
buf << "\n ;";
if (item.note->length() > 15)
buf << "\n ;";
else
buf << " ;";
bool need_separator = false;
for (const char * p = item.note->c_str(); *p; p++) {
if (*p == '\n') {