You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-23Lines changed: 9 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,33 +169,19 @@ To the markdown parser, it doesn't matter how you wrap your sentences, a complet
169
169
170
170
### Tools and automatic formatting
171
171
172
-
**prettier**
172
+
We use a combination of tools to automatically format the documentation.
173
+
If you want to run them locally, install them:
173
174
174
-
It is recommended, but not required, to use [`prettier`](https://prettier.io/) to automatically format markdown files.
175
-
This replaces some cases where two characters would produce the same output, and prefers the less ambiguous one, i.e. `-` instead of `*` for bulleted lists, `_` instead of `*` for italics.
176
-
It also eliminates some common inconsistencies, such as trailing whitespace, too many / too few consecutive newline characters, etc.
177
-
It doesn't help you with everything, for example, the one sentence per line style mentioned above is not something `prettier`
178
-
does automatically, so you'd still have to do that manually.
179
-
Formatting with `prettier` is currently not enforced, but recommended, especially if you are creating new files.
180
-
181
-
**markdowner.py**
182
-
183
-
We have a Python script and GitHub Action to automatically fix some common markdown mistakes.
184
-
This is intentionally not very strict, it only fixes very specific things, such as:
185
-
186
-
- Trims trailing whitespace at the end of lines
187
-
- Replace some utf-8 symbols which have an ascii lookalike
188
-
- Ensures exactly 1 newline before the end of the file
189
-
- De-indents code blocks where everything inside the code block is indented
175
+
```
176
+
pipx install cfengine black
177
+
npm install --global prettier
178
+
```
190
179
191
-
When someone makes one of these "mistakes" it is highlighted in the Pull Request by the GitHub Action.
192
-
If you want to run this script locally and have it fix these things for you, you can:
180
+
And run the command:
193
181
194
-
```bash
195
-
find . -name '*.markdown' -type f -exec python3 .github/workflows/markdowner.py {} all \;
196
182
```
197
-
198
-
In many cases, you can also configure your editor to help you with these things.
0 commit comments