summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/context.cxx13
-rw-r--r--tests/toc/toc.html6
2 files changed, 12 insertions, 7 deletions
diff --git a/cli/context.cxx b/cli/context.cxx
index 1b98322..711086b 100644
--- a/cli/context.cxx
+++ b/cli/context.cxx
@@ -1800,12 +1800,17 @@ format (semantics::scope& scope, string const& s, bool para)
}
}
- // Save the heading number for later.
- //
+ v += in + "<tr>";
+
if (!n.empty ())
- heading_map[pi] = n;
+ {
+ v += "<th>" + n + "</th><td>";
+ heading_map[pi] = n; // Save it for later.
+ }
+ else
+ v += "<td colspan=\"2\">";
- v += in + "<tr><th>" + n + "</th><td>" + pv; // No newline
+ v += pv; // No newline
tocs.push_back (toc_entry (t));
break;
}
diff --git a/tests/toc/toc.html b/tests/toc/toc.html
index 2874edc..5305db9 100644
--- a/tests/toc/toc.html
+++ b/tests/toc/toc.html
@@ -1,11 +1,11 @@
<h1>Table of Contents</h1>
<table class="toc">
- <tr><th></th><td><a href="#preface">Preface</a>
+ <tr><td colspan="2"><a href="#preface">Preface</a>
<table class="toc">
- <tr><th></th><td><a href="#about-document">About This
+ <tr><td colspan="2"><a href="#about-document">About This
Document</a></td></tr>
- <tr><th></th><td><a href="#more-information">More Information</a></td></tr>
+ <tr><td colspan="2"><a href="#more-information">More Information</a></td></tr>
</table>
</td></tr>
<tr><th colspan="2"><a href="#part1">PART I</a></th></tr>