]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tools/make-man-index: fix purpose text that contains tags
authorHaochen Tong <i@hexchain.org>
Sun, 16 Aug 2020 01:28:46 +0000 (03:28 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 17 Aug 2020 16:32:51 +0000 (18:32 +0200)
tools/make-man-index.py

index 4d206ca0b6bb741f9ce2e0d9d012d469e7a2682b..37c708d81dc0953df4bcc2183a49331838da6ae9 100755 (executable)
@@ -55,7 +55,8 @@ def make_index(pages):
         check_id(p, t)
         section = t.find('./refmeta/manvolnum').text
         refname = t.find('./refnamediv/refname').text
-        purpose = ' '.join(t.find('./refnamediv/refpurpose').text.split())
+        purpose_text = ' '.join(t.find('./refnamediv/refpurpose').itertext())
+        purpose = ' '.join(purpose_text.split())
         for f in t.findall('./refnamediv/refname'):
             infos = (f.text, section, purpose, refname)
             index[f.text[0].upper()].append(infos)