Skip to content

Commit 6dbf402

Browse files
committed
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.
1 parent 6552874 commit 6dbf402

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

man/systemd.mount.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,9 @@
444444
created. (See
445445
<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
446446
for more information.) This option is mandatory. Note that the usual specifier expansion is applied
447-
to this setting, literal percent characters should hence be written as <literal>%%</literal>. If this
448-
mount is a bind mount and the specified path does not exist yet it is created as
449-
directory.</para></listitem>
447+
to this setting, literal percent characters should hence be written as <literal
448+
class='specifiers'>%%</literal>. If this mount is a bind mount and the specified path does not exist
449+
yet it is created as directory.</para></listitem>
450450
</varlistentry>
451451

452452
<varlistentry>
@@ -469,7 +469,7 @@
469469

470470
<listitem><para>Mount options to use when mounting. This takes a comma-separated list of options. This setting
471471
is optional. Note that the usual specifier expansion is applied to this setting, literal percent characters
472-
should hence be written as <literal>%%</literal>.</para></listitem>
472+
should hence be written as <literal class='specifiers'>%%</literal>.</para></listitem>
473473
</varlistentry>
474474

475475
<varlistentry>

man/systemd.swap.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,13 @@
184184
project='man-pages'><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry> for
185185
details. If this refers to a device node, a dependency on the respective device unit is automatically
186186
created. (See
187-
<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more
188-
information.) If this refers to a file, a dependency on the respective mount unit is automatically
189-
created. (See <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
190-
for more information.) This option is mandatory. Note that the usual specifier expansion is applied to this
191-
setting, literal percent characters should hence be written as <literal>%%</literal>.</para></listitem>
187+
<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
188+
for more information.) If this refers to a file, a dependency on the respective mount unit is
189+
automatically created. (See
190+
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
191+
more information.) This option is mandatory. Note that the usual specifier expansion is applied to
192+
this setting, literal percent characters should hence be written as
193+
<literal class='specifiers'>%%</literal>.</para></listitem>
192194
</varlistentry>
193195

194196
<varlistentry>

tools/make-directive-index.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ def _extract_directives(directive_groups, formatting, page):
9595
continue
9696
storfile[name.text].append((pagename, section))
9797
formatting[name.text] = name
98+
for name in t.iterfind(".//literal[@class='specifiers']"):
99+
storfile[name.text].append((pagename, section))
100+
formatting[name.text] = name
98101

99102
def _make_section(template, name, directives, formatting):
100103
varlist = template.find(".//*[@id='{}']".format(name))

0 commit comments

Comments
 (0)