Allow skipping anchor checking by regex

To avoid needing to turn off anchor checking across the entire
documentation allow skipping based on matching the anchor against a
regex.

Some sites/pages use JavaScript to perform anchor assignment in a
webpage, which would require rendering the page to determine whether
the anchor exists. Allow fine grain control of whether the anchor is
checked based on pattern matching, until such stage as the retrieved
URLs can be passed through an engine for deeper checking on the HTML
doctree.
This commit is contained in:
Darragh Bailey
2016-10-27 10:52:04 +01:00
parent 78c0d6b46c
commit 22765990f0
4 changed files with 44 additions and 7 deletions
+11
View File
@@ -2083,6 +2083,17 @@ Options for the linkcheck builder
.. versionadded:: 1.2
.. confval:: linkcheck_anchors_ignore
A list of regular expressions that match URIs that should skip checking
the validity of anchors in links. This allows skipping entire sites, where
anchors are used to control dynamic pages, or just specific anchors within
a page, where javascript is used to add anchors dynamically, or use the
fragment as part of to trigger an internal REST request. Default is
``["/#!"]``.
.. versionadded:: 1.5
Options for the XML builder
---------------------------