From 12e689cdbb92a6cf414fa75c1547026076d19150 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Mon, 7 Mar 2011 14:51:16 +0100 Subject: [PATCH] Handle @section inside refdoc blocks. Previously they were just silently ignored. --- refdoc/presentation/make_html.pike | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/refdoc/presentation/make_html.pike b/refdoc/presentation/make_html.pike index 93bbcac83c..14abd6f08b 100644 --- a/refdoc/presentation/make_html.pike +++ b/refdoc/presentation/make_html.pike @@ -591,10 +591,16 @@ string parse_text(Node n, void|String.Buffer ret) { m->href=c->value_of_node(); ret->add( sprintf("<a%{ %s='%s'%}>%s</a>", (array)m, c->value_of_node()) ); + break; case "section": - // werror(c->html_of_node()+"\n"); - // Found... + ret->add ("<h2>", quote (c->get_attributes()->title || + // The following for bug compat. + c->get_attributes()->name), + "</h2>\n"); + if (!equal (c->get_children()->get_any_name(), ({"text"}))) + error ("Expected a single <text> element inside <section>.\n"); + parse_text (c->get_children()[0], ret); break; case "ul": -- GitLab