From acbfdec33e982c01cc2f2cc2cd6bed43665570e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= Date: Tue, 14 Apr 2020 20:15:19 +0200 Subject: [PATCH] make-directive-index: allow pages to specify the path to search So far, make-directive-index would look for ./valistentry/term/varname for elements to add to the directive man page. This commit allows to specify xpath= in the varlist directive to tell the generator what to look for. --- tools/make-directive-index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py index da10575f32..659c6275f5 100755 --- a/tools/make-directive-index.py +++ b/tools/make-directive-index.py @@ -180,9 +180,10 @@ def _extract_directives(directive_groups, formatting, page): storopt = directive_groups['options'] for variablelist in t.iterfind('.//variablelist'): klass = variablelist.attrib.get('class') + searchpath = variablelist.attrib.get('xpath','./varlistentry/term/varname') storvar = directive_groups[klass or 'miscellaneous'] #