aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 643492f9..89fdc5de 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.64 2010/05/17 02:38:13 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.65 2010/05/17 22:11:42 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -27,6 +27,7 @@
#include <string.h>
#include <unistd.h>
+#include "mandoc.h"
#include "out.h"
#include "html.h"
#include "mdoc.h"
@@ -729,6 +730,9 @@ mdoc_nm_pre(MDOC_ARGS)
{
struct htmlpair tag;
+ if (NULL == n->child && NULL == m->name)
+ return(1);
+
if (SEC_SYNOPSIS == n->sec &&
n->prev && MDOC_LINE & n->flags) {
bufcat_style(h, "clear", "both");
@@ -1181,7 +1185,7 @@ mdoc_ex_pre(MDOC_ARGS)
h->flags &= ~HTML_NOSPACE;
}
- if (n->child->next)
+ if (n->child && n->child->next)
print_text(h, "utilities exit");
else
print_text(h, "utility exits");
@@ -1951,7 +1955,7 @@ mdoc_rv_pre(MDOC_ARGS)
print_text(h, "()");
}
- if (n->child->next)
+ if (n->child && n->child->next)
print_text(h, "functions return");
else
print_text(h, "function returns");