[infra] mardown-lint: report missing tocstop (#1818)

This commit is contained in:
Patrice Chalin 2025-01-27 04:38:08 -05:00 committed by GitHub
parent d9f3e97a66
commit 354b0ac7ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -101,6 +101,8 @@ markdown-toc:
if grep -q '<!-- tocstop -->' $$f; then \
echo markdown-toc: processing $$f; \
npx --no -- markdown-toc --bullets "-" --no-first-h1 --no-stripHeadingTags -i $$f || exit 1; \
elif grep -q '<!-- toc -->' $$f; then \
echo markdown-toc: ERROR: '<!-- tocstop -->' missing from $$f; exit 1; \
else \
echo markdown-toc: no TOC markers, skipping $$f; \
fi; \