summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2017-04-14 12:25:10 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2017-04-14 12:25:10 -0700
commit8c81ae0363a045f864a9c185d7744074cd4807ec (patch)
treed0d63cea1b29e92c1c639cdb903aa69066b48818
parent9a5595ceba0cca68719751a7662a339b624a9bd9 (diff)
downloadnasm-8c81ae0363a045f864a9c185d7744074cd4807ec.tar.gz
doc/rdsrc: make sure HTML tags are properly closed
The last file wouldn't necessarily close all the tags. Sigh. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--doc/rdsrc.pl24
1 files changed, 14 insertions, 10 deletions
diff --git a/doc/rdsrc.pl b/doc/rdsrc.pl
index c79ac2e2..b31d9b7e 100644
--- a/doc/rdsrc.pl
+++ b/doc/rdsrc.pl
@@ -818,7 +818,7 @@ sub write_html {
$pflags =~ /chap (.*) :(.*)/;
$title = "Chapter $1: ";
$xref = $2;
- print "</body>\n</html>\n"; select STDOUT; close TEXT;
+ &html_postamble; select STDOUT; close TEXT;
$html_nav_last = $chapternode;
$chapternode = $nodexrefs{$xref};
$html_nav_next = $tstruct_mnext{$chapternode};
@@ -836,7 +836,7 @@ sub write_html {
$pflags =~ /appn (.*) :(.*)/;
$title = "Appendix $1: ";
$xref = $2;
- print "</body>\n</html>\n"; select STDOUT; close TEXT;
+ &html_postamble; select STDOUT; close TEXT;
$html_nav_last = $chapternode;
$chapternode = $nodexrefs{$xref};
$html_nav_next = $tstruct_mnext{$chapternode};
@@ -924,10 +924,10 @@ sub write_html {
}
# Close whichever file was open.
- &html_jumppoints;
- print "</body></html>\n";
- select STDOUT;
- close TEXT;
+ print "</pre>\n" if ($in_code);
+ print "</li>\n</ul>\n" if ($in_list);
+ print "</blockquote>\n" if ($in_bquo);
+ &html_postamble; select STDOUT; close TEXT;
print "\n writing index file...";
open TEXT, '>', File::Spec->catfile($out_path, 'nasmdoci.html');
@@ -951,11 +951,8 @@ sub html_preamble {
print "<link href=\"nasmdoc.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
print "</head>\n";
print "<body>\n";
- &html_jumppoints;
- print "<h1>", $metadata{'title'}, "</h1>\n\n";
-}
-sub html_jumppoints {
+ # Navigation bar
print "<ul class=\"navbar\">\n";
if (defined($html_nav_last)) {
my $lastf = $html_fnames{$html_nav_last};
@@ -968,6 +965,13 @@ sub html_jumppoints {
print "<li><a class=\"toc\" href=\"nasmdoc0.html\">Contents</a></li>\n";
print "<li class=\"last\"><a class=\"index\" href=\"nasmdoci.html\">Index</a></li>\n";
print "</ul>\n";
+
+ print "<h1>", $metadata{'title'}, "</h1>\n";
+}
+
+sub html_postamble {
+ # Closing tags
+ print "</body>\n</html>\n";
}
sub html_index {