From 6dbf40256bd88f1c74657bd9ffbd9eaa06c08706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 7 May 2020 15:05:29 +0200 Subject: [PATCH] man: put all pages which mention a specifier in the index I wasn't 100% convinced that this is the right thing to do, hence the separate commit. But e.g. for paths we index all mentions, so I think it's reasonable to do the same here. --- man/systemd.mount.xml | 8 ++++---- man/systemd.swap.xml | 12 +++++++----- tools/make-directive-index.py | 3 +++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml index d775d74053f..4200a9ed7eb 100644 --- a/man/systemd.mount.xml +++ b/man/systemd.mount.xml @@ -444,9 +444,9 @@ created. (See systemd.device5 for more information.) This option is mandatory. Note that the usual specifier expansion is applied - to this setting, literal percent characters should hence be written as %%. If this - mount is a bind mount and the specified path does not exist yet it is created as - directory. + to this setting, literal percent characters should hence be written as %%. If this mount is a bind mount and the specified path does not exist + yet it is created as directory. @@ -469,7 +469,7 @@ Mount options to use when mounting. This takes a comma-separated list of options. This setting is optional. Note that the usual specifier expansion is applied to this setting, literal percent characters - should hence be written as %%. + should hence be written as %%. diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml index 190fc388c09..c4160290a51 100644 --- a/man/systemd.swap.xml +++ b/man/systemd.swap.xml @@ -184,11 +184,13 @@ project='man-pages'>swapon8 for details. If this refers to a device node, a dependency on the respective device unit is automatically created. (See - systemd.device5 for more - information.) If this refers to a file, a dependency on the respective mount unit is automatically - created. (See systemd.mount5 - for more information.) This option is mandatory. Note that the usual specifier expansion is applied to this - setting, literal percent characters should hence be written as %%. + systemd.device5 + for more information.) If this refers to a file, a dependency on the respective mount unit is + automatically created. (See + systemd.mount5 for + more information.) This option is mandatory. Note that the usual specifier expansion is applied to + this setting, literal percent characters should hence be written as + %%. diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py index c6b2173b2e9..b04281490d6 100755 --- a/tools/make-directive-index.py +++ b/tools/make-directive-index.py @@ -95,6 +95,9 @@ def _extract_directives(directive_groups, formatting, page): continue storfile[name.text].append((pagename, section)) formatting[name.text] = name + for name in t.iterfind(".//literal[@class='specifiers']"): + storfile[name.text].append((pagename, section)) + formatting[name.text] = name def _make_section(template, name, directives, formatting): varlist = template.find(".//*[@id='{}']".format(name))