mirror of
https://github.com/ben-grande/qusal.git
synced 2025-08-09 14:42:12 -04:00
test
This commit is contained in:
parent
758e152b47
commit
a43b48b2e8
4 changed files with 14 additions and 7 deletions
|
@ -13,19 +13,23 @@ usage(){
|
|||
}
|
||||
|
||||
case "${1-}" in
|
||||
""|-h|--?help) usage;;
|
||||
""|-h|--help) usage;;
|
||||
esac
|
||||
|
||||
## vim-markdown-toc deletes lines if they are folded, can't rely on its native
|
||||
## update on save.
|
||||
if ! vim -e -c 'setf markdown' -c 'if !exists(":GenTocGFM") | cq | endif' -c q
|
||||
then
|
||||
echo "Error: Vim Plugin mzlogin/vim-markdown-toc is not installed."
|
||||
echo "Error: Vim Plugin mzlogin/vim-markdown-toc is not installed." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
for f in "$@"; do
|
||||
if ! test -f "$f"; then
|
||||
echo "Error: Not a regular file: $f" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -q "^## Table of Contents$" "$f"; then
|
||||
echo "Could not find table of contents on file: $f" >&2; exit 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue