aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2012-07-18 11:11:12 +0000
committerIngo Schwarze <schwarze@openbsd.org>2012-07-18 11:11:12 +0000
commit50e01545158506c75fea9e1828a29ae1b8c911f0 (patch)
tree5aa45bc2432543e3f9c1c56589afa3665d7c21bd /mdoc.c
parent7a9cc4a7da8d626f4484e36248129567b2bef7f8 (diff)
downloadmandoc-50e01545158506c75fea9e1828a29ae1b8c911f0.tar.gz
mandoc-50e01545158506c75fea9e1828a29ae1b8c911f0.tar.zst
mandoc-50e01545158506c75fea9e1828a29ae1b8c911f0.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. OpenBSD rev. mdoc_validate.c 1.107, mdoc.c 1.91
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mdoc.c b/mdoc.c
index 72c39355..b24f2f85 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,7 +1,7 @@
-/* $Id: mdoc.c,v 1.200 2012/07/18 10:39:19 schwarze Exp $ */
+/* $Id: mdoc.c,v 1.201 2012/07/18 11:11:12 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
@@ -648,6 +648,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.