diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 037004a3c..48e9ddb9f 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -33,6 +33,7 @@ entry: >- bash -eu -o pipefail -c "echo ARGS: \"$@\"; for f in $@; do + [[ \"$f\" =~ --* ]] && MDTOC_ARG=\"$f $MDTOC_ARG\" && continue; [ -f \"$f\" ] && markdown-toc -i $f; done" language: system