Wrapping of long lines #309
Replies: 5 comments 4 replies
-
Actually this isn't a basic question. It's exactly the right question, and it's one of those nasty "simple" questions that rock the foundation of an application's architecture. In order to get print jobs to reflow according to whatever paper size, orientation, margins and scaling you specify in the browser settings - and I must do this because I can't stop you from changing them and I can't set them programmatically - I allow the browser to do the line-breaking. When a run of text doesn't contain anything the browser recognises as a potential line-break site, it causes the behaviour you have noted. The solution is to insert Where?
The former won't work and the latter is ... complicated and expensive. At the moment I do it in the source code document renderer but not in the plaintext renderer. The right place for it isn't in any doc renderer because this problem is global. I'm going to have to parse a DOM and scan it for block elements and then use a state machine to scan forward through the DOM fragment computing run length. Great question. |
Beta Was this translation helpful? Give feedback.
-
There's another thing contributing to this, the plain text renderer puts the text in a pre {
white-space: pre-wrap;
} That's two bugs you've found. |
Beta Was this translation helpful? Give feedback.
-
Well, Steve... is it working as you would expect? I have yet to implement the fancy soft line-break opportunity strategy I mentioned, so far that's just the CSS fix. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It looks like I can only have one symbol displayed at system generated breaks. For plaintext it will be the standard hyphen, for source code it will be the ↩ Extended line-breaking will be in the next release. |
Beta Was this translation helpful? Give feedback.
-
Basic question ... does wrapping of long lines work?
I've tried toggling "Wrap" in VS Code, but the output lines are still not being wrapped ... just trimmed
This is in plain text files
Beta Was this translation helpful? Give feedback.
All reactions