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
[editorconfig] Turn off trim_trailing_whitespace in Markdown in root or changelog_unreleased #11605
Conversation
.editorconfig
Outdated
@@ -18,5 +18,8 @@ trim_trailing_whitespace = false | |||
[tests/{**/__snapshots__/*, tests/format/**/*}] | |||
trim_trailing_whitespace = false | |||
|
|||
[{*,changelog_unreleased/**}.md] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you concat with the config for [website/blog/*.md]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sosukesuzuki I have done. It seems to still work well.
PS> yarn editorconfig .\changelog_unreleased\markdown\.gitkeep
yarn run v1.22.4
$ I:\prettier\node_modules\.bin\editorconfig .\changelog_unreleased\markdown\.gitkeep
charset=utf-8
indent_style=space
indent_size=2
trim_trailing_whitespace=true
end_of_line=lf
insert_final_newline=true
tab_width=2
Done in 0.15s.
PS> yarn editorconfig .\changelog_unreleased\markdown\.gitkeep.md
yarn run v1.22.4
$ I:\prettier\node_modules\.bin\editorconfig .\changelog_unreleased\markdown\.gitkeep.md
charset=utf-8
indent_style=space
indent_size=2
trim_trailing_whitespace=false
end_of_line=lf
insert_final_newline=true
tab_width=2
Done in 0.14s.
PS> yarn editorconfig .\changelog_unreleased\BLOG_POST_INTRO_TEMPLATE.md
yarn run v1.22.4
$ I:\prettier\node_modules\.bin\editorconfig .\changelog_unreleased\BLOG_POST_INTRO_TEMPLATE.md
charset=utf-8
indent_style=space
indent_size=2
trim_trailing_whitespace=false
end_of_line=lf
insert_final_newline=true
tab_width=2
Done in 0.15s.
PS> yarn editorconfig .\changelog_unreleased\BL
yarn run v1.22.4
$ I:\prettier\node_modules\.bin\editorconfig .\changelog_unreleased\BL
charset=utf-8
indent_style=space
indent_size=2
trim_trailing_whitespace=true
end_of_line=lf
insert_final_newline=true
tab_width=2
Done in 0.15s.
PS> yarn editorconfig .\README.md
yarn run v1.22.4
$ I:\prettier\node_modules\.bin\editorconfig .\README.md
charset=utf-8
indent_style=space
indent_size=2
trim_trailing_whitespace=false
end_of_line=lf
insert_final_newline=true
tab_width=2
Done in 0.18s.
PS> yarn editorconfig .\src\foobarbaz.md
yarn run v1.22.4
$ I:\prettier\node_modules\.bin\editorconfig .\src\foobarbaz.md
charset=utf-8
indent_style=space
indent_size=2
trim_trailing_whitespace=true
end_of_line=lf
insert_final_newline=true
tab_width=2
Done in 0.15s.
c588606
to
4d4c4a2
Compare
4d4c4a2
to
35a4c57
Compare
I don't understand why we need this change. |
@fisker In Foo, Bar should not be Baz.
> Quotation. Quotation. Quotation.
>
> Quotation. Quotation. Quotation.
<https://a.source.example.com/>
<https://b.source.example.com/>
<https://c.source.example.com/> Without this, I have to insert empty lines between URLs or use a list. |
I would like to cherry-pick this commit into#11597. Is this allowed? |
I mistook something, Actions for |
@sosukesuzuki I will wait until Actions succeeds. |
You may consider it's bug in Prettier, but this PR doesn't make sense, we keep |
The only need in changelog_unreleased files is wrote some example code, but we can do something like ```markdown
foo<SPACE><SPACE>
``` Other cases we can use |
I am afraid that this is new to me. I would like you to check out the following sandbox showing that trailing 2 spaces are not deformed in the latest stable version of Prettier even when Also, there seem to be no |
@fisker You had me worried. I am relieved that it turned out to be just your misunderstanding. |
@sosukesuzuki I did it because I confirmed that the CI of fa59637 passed. |
@tats-u Ah sorry, I forgot to say you that. |
Description
When EditorConfig is enabled in your text editor, you cannot use line breaking by adding two whitespaces at the end of lines in Markdown files in the project root or
changelog_unreleased
.Checklist
docs/
directory).changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨