-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
enforce rules on code blocks style in docs #11178
Conversation
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.
Awesome! I like that you addressed this problem at the source, rather than in i18n or electronjs.org 👍
@@ -18,7 +18,9 @@ See also [V8 Development](v8-development.md) | |||
It is possible to debug Chromium with Electron by passing | |||
`--build_debug_libcc` to the bootstrap script: | |||
|
|||
$ ./script/bootstrap.py -d --build_debug_libcc | |||
```bash |
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.
Any particular reason some of these are bash
and some are sh
? We should probably just pick one. My vote would be sh
because it's more generic but still always accurate.
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.
We have both bash
and sh
scattered all over the docs; I think if we were to fix them, we should open up another PR for it. Currently, the designated language for each code block isn't actually taken into account how it's rendered.
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.
+1 on preferring sh
over bash
in documentation AFAIK we're not using any bash-only extensions and any variant, e.g. dash
, would also work
+1 on deferring the s/bash/sh/
changes to a followup patch
Getting a ci error only on jenkins machine 🤔
|
🔍 🐞 So @MarshallOfSound and I found a bug in the |
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.
Nice patch :)
This PR adds two rules to enforce proper code block styles (i.e. fenced with ```, and have a language specified per block), and fixes the resulting lint errors in our current docs. This will resolve electron/electronjs.org-old#868 where improper code blocks are not being styled on the website.