From cd73ee1fe287ca77b44370760d72f7eb145f096e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 11 Feb 2016 06:14:17 +0200 Subject: Implement links in TOC --- cli/context.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli') diff --git a/cli/context.cxx b/cli/context.cxx index b923c4b..cd5d88c 100644 --- a/cli/context.cxx +++ b/cli/context.cxx @@ -1696,6 +1696,14 @@ format (semantics::scope& scope, string const& s, bool para) { char t (ph[0]); + if (pi.empty ()) + { + cerr << "error: TOC heading '" << pv << "' has no id" << endl; + throw generation_failed (); + } + + pv = "" + pv + ""; + // Unwind heading levels that are deeper ("more sub") than us. // for (; tocs.size () != 1; tocs.pop_back ()) -- cgit v1.1