diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2012-07-16 09:51:54 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2012-07-16 09:51:54 +0000 |
commit | 6ce3f2b4c19e9fc0cb65fde5b140b294b291bae8 (patch) | |
tree | 80ee6efb119870cfa019c10fddf8342dedf1e7fc /mdoc_man.c | |
parent | 41e81f9fc56dbe499ec91216e92df0095d1e5eb5 (diff) | |
download | mandoc-6ce3f2b4c19e9fc0cb65fde5b140b294b291bae8.tar.gz mandoc-6ce3f2b4c19e9fc0cb65fde5b140b294b291bae8.tar.zst mandoc-6ce3f2b4c19e9fc0cb65fde5b140b294b291bae8.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.
OpenBSD rev. mdoc.c 1.89 and mdoc_validate.c 1.106
Diffstat (limited to 'mdoc_man.c')
-rw-r--r-- | mdoc_man.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.39 2012/07/14 09:07:18 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.40 2012/07/16 09:51:54 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org> * @@ -1342,7 +1342,10 @@ static int pre_sp(DECL_ARGS) { - print_line(".sp", MMAN_nl); + if (MMAN_PP & outflags && MDOC_It != n->parent->tok) + print_line(".PP", 0); + else + print_line(".sp", 0); return(1); } |