From 05c7d67dee09e36688b49da62ba381e36f3a9cf5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Wed, 10 May 2023 12:21:24 +0200 Subject: [PATCH] tools: (asciidoctor-unicodeconverter) properly handle dotted commands MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Split from the end of the docname, as otherwise commands like "fsck.foo" are stripped of their suffix. Signed-off-by: Thomas Weißschuh --- tools/asciidoctor-unicodeconverter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/asciidoctor-unicodeconverter.rb b/tools/asciidoctor-unicodeconverter.rb index 7435ed5ffa..2c6fd43ffe 100644 --- a/tools/asciidoctor-unicodeconverter.rb +++ b/tools/asciidoctor-unicodeconverter.rb @@ -12,7 +12,7 @@ module UnicodeConverter def process document, reader lines = reader.read_lines state = BEFORE_NAME_SECTION - command = document.attributes['docname'].split('.', 2)[0] + command = document.attributes['docname'].rpartition('.')[0] lines.map! do |line| if state == IN_NAME_SECTION line.sub! " \u2013 ", " - " -- 2.47.2