Skip to content

Commit 59decdf

Browse files
committed
Update format-markdown.sh
1 parent 4a8c4ca commit 59decdf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/format-markdown.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
SRCDIR="$(dirname "${BASH_SOURCE[0]}")" # check on Windows
4+
35
for filename in $*; do
46
# mostly to format code blocks with examples, unfortunately messes up bullet lists and tables
57
npx prettier --write --single-quote $filename
@@ -9,5 +11,5 @@ for filename in $*; do
911
sed -E -e "s/ +\|/ |/g" -e "s/\| +/| /g" -e "s/-----+/----/g" $filename > $filename.tmp && mv $filename.tmp $filename
1012

1113
# repair the bullet lists and various other markdown formatting issues
12-
npx --yes markdownlint-cli --fix --config .markdownlint.yaml $filename
14+
npx --yes markdownlint-cli --fix --config $SRCDIR/../.markdownlint.yaml $filename
1315
done

0 commit comments

Comments
 (0)