summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_macro.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2018-12-04 02:53:45 +0000
committerschwarze <schwarze@openbsd.org>2018-12-04 02:53:45 +0000
commit8251afdef70029d8fd8e4e7ccff5b8606a3e0521 (patch)
treeca22636a7a2a24db052cbce6ec116c4013da1cf3 /usr.bin/mandoc/mdoc_macro.c
parentPort p5-Crypt-Random has been removed, replace it with p5-BSD-arc4random. (diff)
downloadwireguard-openbsd-8251afdef70029d8fd8e4e7ccff5b8606a3e0521.tar.xz
wireguard-openbsd-8251afdef70029d8fd8e4e7ccff5b8606a3e0521.zip
Clean up the validation of .Pp, .PP, .sp, and .br. Make sure all
combinations are handled, and are handled in a systematic manner. This resolves some erratic duplicate handling, handles a number of missing cases, and improves diagnostics in various respects. Move validation of .br and .sp to the roff validation module rather than doing that twice in the mdoc and man validation modules. Move the node relinking function to the roff library where it belongs. In validation functions, only look at the node itself, at previous nodes, and at descendants, not at following nodes or ancestors, such that only nodes are inspected which are already validated.
Diffstat (limited to 'usr.bin/mandoc/mdoc_macro.c')
-rw-r--r--usr.bin/mandoc/mdoc_macro.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c
index 250b04e2ad7..d1a0000fad4 100644
--- a/usr.bin/mandoc/mdoc_macro.c
+++ b/usr.bin/mandoc/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_macro.c,v 1.182 2018/08/17 20:31:52 schwarze Exp $ */
+/* $OpenBSD: mdoc_macro.c,v 1.183 2018/12/04 02:53:45 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -1241,7 +1241,7 @@ blk_part_imp(MACRO_PROT_ARGS)
for (n = body->child; n && n->next; n = n->next)
/* Do nothing. */ ;
if (n && n->tok == MDOC_Ns)
- mdoc_node_relink(mdoc, n);
+ roff_node_relink(mdoc, n);
}
static void