diff options
author | 2012-07-16 09:51:03 +0000 | |
---|---|---|
committer | 2012-07-16 09:51:03 +0000 | |
commit | e0dd4c9c0325513a58913e4c40d849d7bc82b0f0 (patch) | |
tree | 5241c5670d120786d6f28833a7c2569c7fac8cd8 /usr.bin/mandoc/mdoc.c | |
parent | Add a man page describing pcap grammar (diff) | |
download | wireguard-openbsd-e0dd4c9c0325513a58913e4c40d849d7bc82b0f0.tar.xz wireguard-openbsd-e0dd4c9c0325513a58913e4c40d849d7bc82b0f0.zip |
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.
Diffstat (limited to 'usr.bin/mandoc/mdoc.c')
-rw-r--r-- | usr.bin/mandoc/mdoc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c index afb8f496865..1b49827545a 100644 --- a/usr.bin/mandoc/mdoc.c +++ b/usr.bin/mandoc/mdoc.c @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.88 2012/07/07 18:27:36 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.89 2012/07/16 09:51:03 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -797,7 +797,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)) |