Dev Docs: Revise Makefile Test To Check For Auto Links In Subheadings

This commit is contained in:
David A. Harding 2014-11-28 21:29:40 -05:00
parent 55645c0024
commit 37c4295fb6
No known key found for this signature in database
GPG key ID: 4B29C30FF29EC4B7

View file

@ -39,7 +39,7 @@ pre-build-tests-fast: check-for-non-ascii-urls
post-build-tests-fast: check-for-build-errors ensure-each-svg-has-a-png check-for-liquid-errors \
check-for-missing-anchors check-for-broken-markdown-reference-links \
check-for-broken-kramdown-tables check-for-duplicate-header-ids \
check-for-headers-with-hrefs
check-for-headers-containing-auto-link
## All pre-build tests, including those which might take multiple minutes
pre-build-tests: pre-build-tests-fast
@ -128,3 +128,9 @@ check-for-duplicate-header-ids:
## report a false positive if we legitimately have an id ending in '-1',
## but that should be easy to work around if it ever happens.
$S grep '<h[1-6][^>]\+id="[^"]\+-1"' _site/en/developer-* | eval $(ERROR_ON_OUTPUT)
check-for-headers-containing-auto-link:
## The autocrossref plugin can mess up subheadings (h2, etc), so ensure
## none of the generated subheadings contain the string
## 'class="auto-link"' produced by autocrossref
$S grep '<\(h[2-6]\).*\?>[^>]\+class="auto-link".*</\1>' _site/en/developer-* | eval $(ERROR_ON_OUTPUT)