[lintian] 04/07: private/refresh-manual-refs: Fix parsing of current Policy
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit 359a63ec8baf6aeea8fba56522383688e49bf3e0
Author: Ville Skyttä <ville.skytta@iki.fi>
Date: Sat Oct 14 11:32:32 2017 +0300
private/refresh-manual-refs: Fix parsing of current Policy
$index_re would match the Policy's TOC and work otherwise, but the TOC
is generated only 3 levels deep as of Policy 4.1.1.1, and we want refs
to all levels.
Signed-off-by: Chris Lamb <lamby@debian.org>
---
private/refresh-manual-refs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/private/refresh-manual-refs b/private/refresh-manual-refs
index d075ffd..3d89822 100755
--- a/private/refresh-manual-refs
+++ b/private/refresh-manual-refs
@@ -73,7 +73,18 @@ my %manuals = (
'policy' => [
'/usr/share/doc/debian-policy/policy.html/index.html',
'https://www.debian.org/doc/debian-policy/',
- $link_re, $fields
+ # $index_re would match the Policy's TOC and work otherwise, but
+ # the TOC is generated only up to 3 levels deep as of 4.1.1.1, and
+ # we want refs to all levels.
+ qr{
+ <(h[2-5])>\s*
+ ([A-Z]|[A-Z]?[\d\.]+?)
+ \.?\s+
+ ([\w\s[:punct:]]+?)
+ <a\s(?:[^>]*?)\bhref="([^"]+)".+?</a>
+ </\1>
+ }x,
+ [['_ignored'], ['section'], ['title'], ['url']]
],
'menu-policy' => [
'/usr/share/doc/debian-policy/menu-policy.html/index.html',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: