diff options
author | 2017-01-10 12:54:27 +0000 | |
---|---|---|
committer | 2017-01-10 12:54:27 +0000 | |
commit | 43808411b98465be92786c535533e1a34b13f155 (patch) | |
tree | d9f22e1ac2ae3a2ab7773a5618911c4ae65635ef /usr.bin/mandoc/mdoc_html.c | |
parent | Quote backslash as well for %%%. (diff) | |
download | wireguard-openbsd-43808411b98465be92786c535533e1a34b13f155.tar.xz wireguard-openbsd-43808411b98465be92786c535533e1a34b13f155.zip |
Introduce flags NODE_NOSRC and NODE_NOPRT for AST nodes.
Use them to mark generated nodes and nodes that shall not produce output.
Let -Ttree output mode display these new flags.
Use NODE_NOSRC for .Ar, .Mt, and .Pa default arguments.
Use NODE_NOPRT for .Dd, .Dt, and .Os.
These will help to make handling of text production macros more rigorous.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index a5a646cd541..c18b2d48b96 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_html.c,v 1.117 2017/01/09 12:48:52 schwarze Exp $ */ +/* $OpenBSD: mdoc_html.c,v 1.118 2017/01/10 12:54:27 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -375,6 +375,9 @@ print_mdoc_node(MDOC_ARGS) int child; struct tag *t; + if (n->flags & NODE_NOPRT) + return; + child = 1; t = h->tags.head; n->flags &= ~MDOC_ENDED; |