diff options
author | 2012-07-18 11:09:30 +0000 | |
---|---|---|
committer | 2012-07-18 11:09:30 +0000 | |
commit | bb99f0faa0a8ee1148db6c0919034af3ebb54caa (patch) | |
tree | 5f8f940d42e7fe80e5597e4f1fed801ac64e91e1 /usr.bin/mandoc/mdoc.c | |
parent | The mdoc(7) \*(Ba predefined string actually forces roman font; (diff) | |
download | wireguard-openbsd-bb99f0faa0a8ee1148db6c0919034af3ebb54caa.tar.xz wireguard-openbsd-bb99f0faa0a8ee1148db6c0919034af3ebb54caa.zip |
Fix handling of paragraph macros inside lists:
* When they are trailing the last item, move them outside the list.
* When they are trailing any other none-compact item, drop them.
Improves formatting of 40 pages, e.g. grep(1), ksh(1), netstat(1),
ath(4), bsd.port.mk(5), pf.conf(5), mount(8), crypto(9).
Diffstat (limited to 'usr.bin/mandoc/mdoc.c')
-rw-r--r-- | usr.bin/mandoc/mdoc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c index ca5b09b2550..9ffc5dab783 100644 --- a/usr.bin/mandoc/mdoc.c +++ b/usr.bin/mandoc/mdoc.c @@ -1,7 +1,7 @@ -/* $Id: mdoc.c,v 1.90 2012/07/18 10:36:20 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.91 2012/07/18 11:09:30 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> - * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2010, 2012 Ingo Schwarze <schwarze@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -644,6 +644,14 @@ mdoc_node_delete(struct mdoc *m, struct mdoc_node *p) mdoc_node_free(p); } +int +mdoc_node_relink(struct mdoc *m, struct mdoc_node *p) +{ + + mdoc_node_unlink(m, p); + return(node_append(m, p)); +} + #if 0 /* * Pre-treat a text line. |