]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tools: (asciidoctor-unicodeconverter) don't fix multi manpages
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 10 May 2023 10:23:20 +0000 (12:23 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 10 May 2023 10:30:08 +0000 (12:30 +0200)
The logic does not work for manpages describing multiple subjects, so
skip it for them.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
tools/asciidoctor-unicodeconverter.rb

index 2c6fd43ffe3a185136b8d30feaec19b592c003e7..759307acce0924ea62cd0f45d8d6ca6a5a9f1763 100644 (file)
@@ -17,7 +17,7 @@ module UnicodeConverter
         if state == IN_NAME_SECTION
           line.sub! " \u2013 ", " - "
           line.sub! " \u2014 ", " - "
-          if line.start_with? command and not line.start_with? "#{command} - "
+          if line.start_with? command and not line.include? ',' and not line.start_with? "#{command} - "
             logger.warn "adding dash to name section of #{document.attributes['docfile']}"
             line.sub! command, "#{command} - "
           end