Modify parse_devedge_doc.pl so it didn't lose the description after the first note (this was bad.)
Madify parse_apidoc.pl to warn (not croak) on empty tags, and to be able to deal with duplicate tags.
This commit is contained in:
Родитель
8a88f3dc07
Коммит
82ad8fc593
|
@ -375,7 +375,9 @@ sub EndTag {
|
|||
if (grep(/^$tagname$/, @CDATA_TAGS)) {
|
||||
$iscontainer = 1;
|
||||
if ($pending_text eq "") {
|
||||
$expat->xpcroak ("Empty container '$tagname'.");
|
||||
print STDERR "WARNING: Empty container '$tagname' at line " .
|
||||
$expat->current_line . " ignored.\n";
|
||||
#$expat->xpcroak ("Empty container '$tagname'.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -492,7 +494,7 @@ sub EndTag {
|
|||
} elsif ($tagname eq $TAGS[$FOOT]) {
|
||||
$user_foot .= $result_text;
|
||||
} else {
|
||||
$c->{$tagname} = $result_text;
|
||||
$c->{$tagname} .= $result_text;
|
||||
}
|
||||
|
||||
$pending_text = pop (@text_stack);
|
||||
|
|
|
@ -190,9 +190,10 @@ sub parse_entry {
|
|||
&open_container ($TAGS[$mode]);
|
||||
} elsif (($mode == $NOTE) && ($line =~ /<\/BLOCKQUOTE>/)) {
|
||||
# note over
|
||||
$partialline = '<H4><A NAME="Head3;"></A>';
|
||||
# dirty little hack to get it to execute the
|
||||
# 'figure out next mode' logic above.
|
||||
output ("<P/>\n");
|
||||
&close_container ($TAGS[$mode]);
|
||||
$mode = $DESCRIPTION;
|
||||
&open_container ($TAGS[$mode]);
|
||||
} elsif (($mode == $SYNTAX) || ($mode == $EXAMPLE)) {
|
||||
if (($mode == $SYNTAX) &&
|
||||
($line =~ /(.*)<TABLE BORDER="0">/)) {
|
||||
|
@ -271,10 +272,11 @@ sub parse_entry {
|
|||
} elsif ($mode == $SEE_ALSO) {
|
||||
if ($line =~ /(.*)<\/P>/) {
|
||||
my $list = &fixup ($1);
|
||||
my @refs = split(/,\s*/, $list);
|
||||
my @refs = split(/\s*,\s*/, $list);
|
||||
for (@refs) {
|
||||
if ($_) {
|
||||
&tag ($TAGS[$mode], "value", $_);
|
||||
$_ =~ /^\s*(\S+)\s*$/;
|
||||
&tag ($TAGS[$mode], "value", $1);
|
||||
}
|
||||
}
|
||||
$mode = $COMPLETED;
|
||||
|
|
Загрузка…
Ссылка в новой задаче