Semantic Linefeeds
Yuriy Skalko
yuriy.skalko at gmail.com
Mon Oct 17 10:21:40 UTC 2022
Thanks all for the feedback!
Here is a patch to try.
Should we also have minimal line length?
Yuriy
-------------- next part --------------
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 4ce94415f7..61a9e23c61 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -1746,16 +1746,21 @@ void Paragraph::write(ostream & os, BufferParams const & bparams,
column = 0;
break;
case '.':
+ case '!':
+ case '?':
+ case ':':
+ case ';':
+ case ',':
+ case 0x2014: // — U+2014 em-dash
flushString(os, write_buffer);
if (i + 1 < size() && d->text_[i + 1] == ' ') {
- os << ".\n";
+ os << to_utf8(docstring(1, c)) << '\n';
column = 0;
} else
- os << '.';
+ os << to_utf8(docstring(1, c));
break;
default:
- if ((column > 70 && c == ' ')
- || column > 79) {
+ if (column > 500) {
flushString(os, write_buffer);
os << '\n';
column = 0;
More information about the lyx-devel
mailing list