File tree Expand file tree Collapse file tree 3 files changed +4378
-1
lines changed Expand file tree Collapse file tree 3 files changed +4378
-1
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,12 @@ jobs:
2323 fetch-depth : 0
2424 - name : use the javascript environment from main
2525 run : |
26- git checkout remotes/origin/main -- package.json package-lock.json
26+ git checkout remotes/origin/main -- package.json package-lock.json .markdownlint.yaml
2727 - uses : actions/setup-node@v4 # setup Node.js
2828 with :
2929 node-version : ' 20.x'
3030 - name : Validate markdown
3131 run : npx --yes mdv versions/3.*.md
32+ - name : Lint markdown v3.0.4
33+ run : npx --yes markdownlint-cli --config .markdownlint.yaml versions/3.0.4.md
3234
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ SRCDIR=" $( dirname " ${BASH_SOURCE[0]} " ) "
4+
5+ for filename in $* ; do
6+ # mostly to format code blocks with examples, unfortunately messes up bullet lists and tables
7+ npx prettier --write --single-quote $filename
8+
9+ # repair the tables: remove superfluos spaces and dashes that make diffing revisions harder
10+ # and sed -i is not portable, so we need to use a temporary file
11+ sed -E -e " s/ +\|/ |/g" -e " s/\| +/| /g" -e " s/-----+/----/g" $filename > $filename .tmp && mv $filename .tmp $filename
12+
13+ # repair the bullet lists and various other markdown formatting issues
14+ npx --yes markdownlint-cli --fix --config $SRCDIR /../.markdownlint.yaml $filename
15+ done
You can’t perform that action at this time.
0 commit comments