feat(markdown): add proseWrap: "preserve" option#3340
Conversation
|
Maybe this should be the default? Currently |
|
It will be an actual breaking change if we change the default, though the change is to preserve linebreaks, not sure if we should do so. |
|
@vjeux Thoughts on making this the default? |
|
I am not a fan of the current default, breaking words to 80 columns for markdown is imo a bad idea. Honestly I think that the best default would be to put everything in one line, but making preserve would be a step in the right direction from my point of view. |
azz
left a comment
There was a problem hiding this comment.
Might want to update playground as well?
|
The playground option should be in another PR, tracked in #3338. |
|
So this basically means prettier won't touch paragraphs all all? If so I'd prefer the default being all in a single line - I expect prettier to normalize stuff not just ignore inconsistencies. I do think this option is a good alternative, but I do think the value proposition of either of the two existing options are higher |
|
I originally choose I don't have strong preference here. |
|
My vote goes towards making "preserve" the default. |
| if (typeof normalized.proseWrap === "boolean") { | ||
| normalized.proseWrap = normalized.proseWrap ? "always" : "never"; | ||
|
|
||
| console.warn( |
There was a problem hiding this comment.
Do we still use deprecated.js? It seems to be outdated.
There was a problem hiding this comment.
It seems it's only used for useFlowParser warning.
I think we can refactor those option warnings/redirections using #3352.
|
LGTM. |
Fixes #3302
Since detecting sentences in different natural languages is hard, preserving original linebreaks should be a good alternative.
Ref: #3302 (comment)