diff options
author | 2012-07-18 11:11:12 +0000 | |
---|---|---|
committer | 2012-07-18 11:11:12 +0000 | |
commit | 50e01545158506c75fea9e1828a29ae1b8c911f0 (patch) | |
tree | 5aa45bc2432543e3f9c1c56589afa3665d7c21bd /mdoc.c | |
parent | 7a9cc4a7da8d626f4484e36248129567b2bef7f8 (diff) | |
download | mandoc-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.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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. |