Update Ruby version, remove Travis workaround, and add Markdown linter - #100
Merged
Conversation
harding
force-pushed
the
2019-01-deps-tests
branch
from
January 9, 2019 16:10
47d4d1f to
32b924d
Compare
Markdown rules say that a line ending with two spaces receives a <br> tag. Since spaces at the end of a line are generally invisible, they make reviews harder, so we use the mdl Markdown linter to warn about any number of spaces at line end. If you want to create a <br>, just use a <br> tag manually.
harding
force-pushed
the
2019-01-deps-tests
branch
from
January 9, 2019 16:15
32b924d to
f3103ce
Compare
Contributor
|
Looks great. Tested ACK f3103ce. As suggested here: #99 (comment), I'll merge this after next week's newsletter is merged. |
Contributor
|
#101 is merged, so merging this too. |
bitschmidty
pushed a commit
that referenced
this pull request
Mar 19, 2024
* newsletter292zh * fix style * Apply suggestions from code review Co-authored-by: freeyao <johnyao1526@gmail.com> --------- Co-authored-by: Zhiwei(Jeffrey) Hu <huzhiwei@outlook.com> Co-authored-by: freeyao <johnyao1526@gmail.com>
harding
pushed a commit
to harding/bitcoinops.github.io
that referenced
this pull request
Sep 27, 2024
* newsletter292zh * fix style * Apply suggestions from code review Co-authored-by: freeyao <johnyao1526@gmail.com> --------- Co-authored-by: Zhiwei(Jeffrey) Hu <huzhiwei@outlook.com> Co-authored-by: freeyao <johnyao1526@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the need for the workaround in 71e9fad by updating Ruby. I chose Ruby 2.5.1 because that's the version used for Ubuntu 18.04 LTS, so users of that system should, in theory, not even need to use rvm to get a Ruby to build site previews. I use Debian, not Ubuntu, so I haven't tested that.
This also adds a lint checker suggested by @practicalswift with a single check for extraneous spaces at the end of a line. I think this is an important rule because some Markdown parsers turn two spaces at the end of a line into a
<br>tag, complicating review because whitespace at the end of a line is often invisible. There are plenty of other rules we can add if we want, although I'd prefer to focus on preventing problems rather than enforcing a consistent style.The short steps to upgrade are:
cdto your checkoutmake all, then runcp -a _site _old_siteOptionally, you can finish by running
diff -ru _old_site _siteto see how this change affects the build. Besides changing in-file datestamps, the only changes I see are rearragements in the order associative arrays are printed and the README.md file is no longer rendered on the site (as expected).Note that if you checkout out a branch that uses the previous version of Ruby, you need to exit and re-enter the top-level repository directory to get RVM to select the current Ruby version. You can go to your home directory and back to your last-used directory using:
cd ; cd -On my system, going back to an older version of Ruby causes one of HTMLproofer's dependencies to segfault. This can be resolved by deleting your cached bundler gems (on Linux, try
mv ~/.gems /tmp) and then re-runningbundle install