diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-05 15:16:54 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-05 15:16:54 +0000 |
commit | 6d7c85a836b858fef745d7155c7346bbfad5f1c9 (patch) | |
tree | e63bcfb45cd369f8edb3990ed92aaa7e389dff1c | |
parent | 3b5c007dc4f0c8630755c3e0a6242509be7b2f40 (diff) | |
download | mandoc-6d7c85a836b858fef745d7155c7346bbfad5f1c9.tar.gz mandoc-6d7c85a836b858fef745d7155c7346bbfad5f1c9.tar.zst mandoc-6d7c85a836b858fef745d7155c7346bbfad5f1c9.zip |
Do not misinterpret function arguments as function names;
improves semantic analysis of more than 300 manuals.
-rw-r--r-- | mandocdb.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.176 2014/12/05 14:26:40 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.177 2014/12/05 15:16:54 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -1681,6 +1681,9 @@ parse_mdoc_Fo(struct mpage *mpage, const struct mdoc_meta *meta, const struct mdoc_node *n) { + if (n->type != MDOC_HEAD) + return(1); + putmdockey(mpage, n->child, TYPE_Fn); if (n->sec == SEC_SYNOPSIS) putmdockey(mpage, n->child, NAME_SYN); |