=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.194 retrieving revision 1.195 diff -u -p -r1.194 -r1.195 --- mandoc/mdoc_html.c 2014/08/01 19:25:52 1.194 +++ mandoc/mdoc_html.c 2014/08/06 15:09:05 1.195 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.194 2014/08/01 19:25:52 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.195 2014/08/06 15:09:05 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -380,8 +380,9 @@ print_mdoc_head(MDOC_ARGS) print_gen_head(h); bufinit(h); - bufcat_fmt(h, "%s(%s)", meta->title, meta->msec); - + bufcat(h, meta->title); + if (meta->msec) + bufcat_fmt(h, "(%s)", meta->msec); if (meta->arch) bufcat_fmt(h, " (%s)", meta->arch); @@ -525,7 +526,11 @@ mdoc_root_pre(MDOC_ARGS) mandoc_asprintf(&volume, "%s (%s)", meta->vol, meta->arch); - mandoc_asprintf(&title, "%s(%s)", meta->title, meta->msec); + if (NULL == meta->msec) + title = mandoc_strdup(meta->title); + else + mandoc_asprintf(&title, "%s(%s)", + meta->title, meta->msec); PAIR_SUMMARY_INIT(&tag[0], "Document Header"); PAIR_CLASS_INIT(&tag[1], "head");