summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-04-03 13:02:35 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-04-03 13:02:35 +0000
commitd9b4ef04d59b4dfd661c39eee2c8bb5faafc55cf (patch)
tree0e7f76f0d95b64161f48ff031fbf3fc8fbf761bc /mdoc.c
parent4a9daab0eee75a39e31cd397377bcf847eb585f1 (diff)
downloadmandoc-d9b4ef04d59b4dfd661c39eee2c8bb5faafc55cf.tar.gz
Merging patch by Ingo Schwarze.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/mdoc.c b/mdoc.c
index a866dbb4..05d75cfd 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -600,8 +600,18 @@ parsetext(struct mdoc *m, int line, char *buf)
for (i = 0; ' ' == buf[i]; i++)
/* Skip leading whitespace. */ ;
- if ('\0' == buf[i])
- return(mdoc_perr(m, line, 0, ENOBLANK));
+ if ('\0' == buf[i]) {
+ if ( ! mdoc_pwarn(m, line, 0, ENOBLANK))
+ return(0);
+ /*
+ * Assume that a `Pp' should be inserted in the case of
+ * a blank line. Technically, blank lines aren't
+ * allowed, but enough manuals assume this behaviour
+ * that we want to work around it.
+ */
+ if ( ! mdoc_elem_alloc(m, line, 0, MDOC_Pp, NULL))
+ return(0);
+ }
/*
* Break apart a free-form line into tokens. Spaces are