summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2012-07-16 09:51:54 +0000
committerIngo Schwarze <schwarze@openbsd.org>2012-07-16 09:51:54 +0000
commit9cc2ea62b7433f3021b78293349ccddded36ce3c (patch)
treea0d5bc5eb6dec5a31c7a860c48546a0be56f158b /mdoc.c
parent7d38f2b698595b8911b6d5954a9f59103ac33ff8 (diff)
downloadmandoc-9cc2ea62b7433f3021b78293349ccddded36ce3c.tar.gz
Several -mdoc parser improvements related to vertical spacing:
* So far, .Pp and .Lp were removed before paragraph type blocks. * Now also remove .br before paragraph type blocks. * Treat .Lp as a paragraph like .Pp, so remove .Pp, .Lp, .br before it. * Do not treat .sp as a paragraph, don't remove anything before it. * After .Sh, .Ss, .Pp, and .Lp, remove .Pp, .Lp, .sp, .br, and blank lines. * After .sp and .br, remove .br. OpenBSD rev. mdoc.c 1.89 and mdoc_validate.c 1.106
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mdoc.c b/mdoc.c
index b32614f3..90cc8169 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -801,7 +801,8 @@ mdoc_ptext(struct mdoc *m, int line, char *buf, int offs)
return(0);
m->next = MDOC_NEXT_SIBLING;
- return(1);
+
+ return(mdoc_valid_post(m));
}
if ( ! mdoc_word_alloc(m, line, offs, buf+offs))