You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an docstring entry spans multiple lines, there's no option to join them in addition to breaking over-the-column-limit lines up to newlines. Sometimes user may prefer automatic joining behavior. For example, when authoring comments, I may add some words in one line of comment as an edit and it would be nice when this comment gets folded into multiple lines, the next line can join up with end of the last newly created lines, as opposed to stay on the next line.
The text was updated successfully, but these errors were encountered:
The biggest challenge is the formatting logic is a big hairball right now and working on it is unpleasant. I have some intuition for how to improve but it requires some energy and dedication to get it going.
I can make a case for there being three desirable behaviors here:
Do nothing: Generate warnings, but don't change the input.
Column Wrap: If a line exceeds a specified width, insert a new line at the first whitespace counting backward from that width.
Re-render: Parse and re-render everything with CommonMark at a specified width, wiping out any soft line breaks.
If a user is sensitive to ragged edges caused by inserted newlines, then they'd be likely to want the more drastic "re-render everything to the 'one true format'" option (a la gofmt / prettier). I think any attempt to fill in ragged edges by changing downstream content will be a lot of work for something that's worse than the alternatives.
There's also a school of thought that Markdown's whitespace insensitivity can be exploited to make prose easier to read and write. For folks like me who subscribe to that, the first option (warn only) would be the most appealing.
When an docstring entry spans multiple lines, there's no option to join them in addition to breaking over-the-column-limit lines up to newlines. Sometimes user may prefer automatic joining behavior. For example, when authoring comments, I may add some words in one line of comment as an edit and it would be nice when this comment gets folded into multiple lines, the next line can join up with end of the last newly created lines, as opposed to stay on the next line.
The text was updated successfully, but these errors were encountered: