diff options
author | 2017-01-10 12:53:07 +0000 | |
---|---|---|
committer | 2017-01-10 12:53:07 +0000 | |
commit | f313579fbb5a5318367521793dc24d2567da2fde (patch) | |
tree | 59f0ec418ab638218374512a8cc78a4cde422b54 /mdoc_html.c | |
parent | c8505d9515e240b816d67a5b4a08ccfd4268cb6a (diff) | |
download | mandoc-f313579fbb5a5318367521793dc24d2567da2fde.tar.gz mandoc-f313579fbb5a5318367521793dc24d2567da2fde.tar.zst mandoc-f313579fbb5a5318367521793dc24d2567da2fde.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 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 3de14e2a..9770c7d5 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.242 2017/01/09 12:48:58 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.243 2017/01/10 12:53:07 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -377,6 +377,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; |