-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown formatting is adding line breaks around 80 characters, Prettier does not add any by default. #9191
Comments
Markdown is supposed to reflow itself. If you take a look at our documentation, it is all formatted with dprint at 80 cols and reflows perfectly fine when rendered as HTML. Markdown requires two line breaks to actually break a line. |
@kitsonk OK, that is interesting. I had not actually tested it with HTML, it was just a shock to see the non-standard formatting. I think it would be much better to leave it at the Prettier default as the editor can take care of the word wrapping. VSCode soft wraps with:
and Vim/Neovim soft wraps to Window size with:
Having it hard wrapped at 80 cols can be super annoying, and differs from the expected Prettier default compatability. It would be interseting to hear what other people think. |
Just a note that it's configured to do this here, which is similar to prettier's Line 287 in ffb4b32
|
I disagree that it is non-standard... It just doesn't meet your expectations.
Deno has been consistent in hard wrapping at 80 cols, be it code, or be it now markdown. @dsherret thanks for the heads up on the config. |
While I don't mind hard-wrapping long lines, joining shorter lines causes noisy diffs: Left: each part of the sentence is a separate line, so rewriting it doesn't affect the rest of the paragraph. |
This was addressed in #11857 and can be configured using |
@dsherret In the following example.
prettier --write filename.md
does not change the formatting.deno fmt filename.md
creates:An unwanted linebreak has been inserted, this makes it impossible to work with any text that needs to reflow... like 99% of text on the web. Thanks :)
The text was updated successfully, but these errors were encountered: