From 26a99d68971351198c58e5980d07804d8153bfaf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 11 Feb 2016 08:44:34 +0200 Subject: Remove empty from preface TOC entries --- cli/context.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'cli') 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 + ""; + if (!n.empty ()) - heading_map[pi] = n; + { + v += "" + n + ""; + heading_map[pi] = n; // Save it for later. + } + else + v += ""; - v += in + "" + n + "" + pv; // No newline + v += pv; // No newline tocs.push_back (toc_entry (t)); break; } -- cgit v1.1