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.
This commit is contained in:
Nick Mathewson 2014-04-28 12:07:57 -04:00
parent 9b825ffc4f
commit 3266f04925
2 changed files with 7 additions and 6 deletions

View File

@ -491,15 +491,15 @@ GENERAL OPTIONS
attacker who obtains the logs. If only one severity level is given, all
messages of that level or higher will be sent to the listed destination.
**Log** __minSeverity__[-__maxSeverity__] **file** __FILENAME__::
[[Log2]] **Log** __minSeverity__[-__maxSeverity__] **file** __FILENAME__::
As above, but send log messages to the listed filename. The
"Log" option may appear more than once in a configuration file.
Messages are sent to all the logs that match their severity
level.
**Log** **[**__domain__,...**]**__minSeverity__[-__maxSeverity__] ... **file** __FILENAME__ +
[[Log3]] **Log** **[**__domain__,...**]**__minSeverity__[-__maxSeverity__] ... **file** __FILENAME__ +
**Log** **[**__domain__,...**]**__minSeverity__[-__maxSeverity__] ... **stderr**|**stdout**|**syslog**::
[[Log4]] **Log** **[**__domain__,...**]**__minSeverity__[-__maxSeverity__] ... **stderr**|**stdout**|**syslog**::
As above, but select messages by range of log severity __and__ by a
set of "logging domains". Each logging domain corresponds to an area of
functionality inside Tor. You can specify any number of severity ranges
@ -2197,7 +2197,7 @@ The following options are used for running a testing Tor network.
Try this often to download a v3 authority certificate before giving up.
Changing this requires that **TestingTorNetwork** is set. (Default: 8)
**TestingDirAuthVoteGuard** __node__,__node__,__...__::
[[TestingDirAuthVoteGuard]] **TestingDirAuthVoteGuard** __node__,__node__,__...__::
A list of identity fingerprints, nicknames, country codes and
address patterns of nodes to vote Guard for regardless of their
uptime and bandwidth. See the **ExcludeNodes** option for more

View File

@ -41,8 +41,9 @@ loadTorrc("./src/config/torrc.sample.in", \%torrcSampleOptions);
my $considerNextLine = 0;
open(F, "./doc/tor.1.txt") or die;
while (<F>) {
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;