-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Replace trailing space line breaks with backslash line breaks and remove all other trailing whitespace #10470
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Probably need someone to convert to |
I converted them |
This comment was marked as resolved.
This comment was marked as resolved.
You're going to need to check CI as there are new failures. |
The new CI failures should be fixed now. |
nope |
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.
strategy for the automated edits looks good & i manually checked the first few years of news posts since those are always a nightmare...
if you do more remark things please try to use remark's output ( |
I think it's a lot more efficient to do things rule by rule. e.g. making one PR for removing trailing whitespace, one PR for using the right style for emphasis than to make a PR for whitespace but also fix all remark warnings in all edited files when I'm planning to make seperate PR's for those remark rules anyways. To put it more concretely:
is more efficient than
|
I'm not saying to include unrelated changes in same PR. what I mean is that remark can print markdown itself using its this PR still helps on its own, I just want to make sure we're looking at |
This comment was marked as resolved.
This comment was marked as resolved.
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.
lgtm for everything from wiki
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.
i've skimmed the backslash changes and looks good otherwise for the news part
Co-authored-by: Walavouchey <[email protected]>
i've verified locally that the provided command ( |
@peppy @Ephemeralis this touches help centre and will thus need a tap from either of you |
Your translation may be missing new pending changes to English articles. Please update your translation after they are merged: |
Steps to recreate
If you run remark on 1a574a9 you will find there are 1372 'Hard breaks should be made with a backslash' warnings.
If you search for the regex
{2,}\n
you will find 1468 matchesThis means there are 1468-1372=96 instances of trailing whitespace that doesn't do anything.
The first two commits only do the regexes in news/ because wiki/ doesn't have any 'Hard breaks should be made with a backslash' warnings.
First commit (news/ only) Remove all instances of trailing whitespace that doesn't do anything
(replaces 71 instances in 44 files)
2. Remove trailing spaces after list items:
Run this twice
(replaces 10 instances in 8 files)
3. Remove spaces on blank lines that consist entirely of spaces:
(replaces 14 instances in 11 files)
4. Remove trailing spaces in HTML: Replace
(>) {2,}+\n
with$1\n
(replaces 1 instance)
71+10+14+1=96 meaning all instances of trailing whitespace that doesn't do anything has been removed.
If you re-run remark after this commit the amount of total warnings and 'Hard breaks should be made with a backslash' warnings will be the same, indicating that the trailing spaces I removed weren't line breaks.
Second commit (news/ only) Replace trailing space line breaks with backslash line breaks
If you re-run remark after this commit all 1372 'Hard breaks should be made with a backslash' warnings will be gone
Third commit (news/ and wiki/) Remove all remaining trailing whitespace
Since all 'Hard breaks should be made with a backslash' warnings are gone, we know the remaining whitespace doesn't do anything so it can be removed.
Fourth commit (news/ and wiki/) Replace consecutive blank lines with single blank line (addresses the new CI failures)
Self-check
SKIP_WIKILINK_CHECK SKIP_OUTDATED_CHECK
SKIP_REMARK
to avoid having to fix irrelevant style errors (past run: https://github.com/ppy/osu-wiki/actions/runs/6957141356)