From 3266f04925b871519f3193890edb5c40f4be0b39 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 28 Apr 2014 12:07:57 -0400 Subject: Fix the check-docs script We broke it when we added anchors to the manpage. This patch fixes it, and makes it sorta detect missing anchors. --- scripts/maint/checkOptionDocs.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/maint/checkOptionDocs.pl b/scripts/maint/checkOptionDocs.pl index 23e57b489..94307c6ce 100755 --- a/scripts/maint/checkOptionDocs.pl +++ b/scripts/maint/checkOptionDocs.pl @@ -41,8 +41,9 @@ loadTorrc("./src/config/torrc.sample.in", \%torrcSampleOptions); my $considerNextLine = 0; open(F, "./doc/tor.1.txt") or die; while () { - if (m!^\*\*([A-Za-z0-9_]+)\*\*!) { - $manPageOptions{$1} = 1; + if (m!^(?:\[\[([A-za-z0-9_]+)\]\] *)?\*\*([A-Za-z0-9_]+)\*\*!) { + $manPageOptions{$2} = 1; + print "Missing an anchor: $2\n" unless (defined $1 or $2 eq 'tor'); } } close F; -- cgit v1.2.3