git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] doc: remove asciidoctor hack

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 24, 2023, 14:51 UTC
Message-ID
<20230424145141.11964-1-felipe.contreras@gmail.com>

The hack was added in 7a30134358 (asciidoctor-extensions: provide `<refmiscinfo/>`, 2019-09-16) in order to deal with the fact that asciidoctor doesn't pick up `manversion`, however, we don't require `manversion` anymore, since 9a09ed3229 (doc: simplify man version, 2023-04-07).

So we can get rid of this hack without any functional changes.

The caveat is that we now require asciidoctor v1.5.7, which was released 5 years ago.

Cc: Martin Ågren <martin.agren@gmail.com>
Cc: Jeff King <peff@peff.net>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/asciidoctor-extensions.rb | 17 -----------------
 1 file changed, 17 deletions(-)
diff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb
index d906a00803..70a0956663 100644
--- a/Documentation/asciidoctor-extensions.rb
+++ b/Documentation/asciidoctor-extensions.rb
@@ -23,26 +23,9 @@ module Git
         end
       end
     end
-
-    class DocumentPostProcessor < Asciidoctor::Extensions::Postprocessor
-      def process document, output
-        if document.basebackend? 'docbook'
-          mansource = document.attributes['mansource']
-          manversion = document.attributes['manversion']
-          manmanual = document.attributes['manmanual']
-          new_tags = "" \
-            "<refmiscinfo class=\"source\">#{mansource}</refmiscinfo>\n" \
-            "<refmiscinfo class=\"version\">#{manversion}</refmiscinfo>\n" \
-            "<refmiscinfo class=\"manual\">#{manmanual}</refmiscinfo>\n"
-          output = output.sub(/<\/refmeta>/, new_tags + "</refmeta>")
-        end
-        output
-      end
-    end
   end
 end
 
 Asciidoctor::Extensions.register do
   inline_macro Git::Documentation::LinkGitProcessor, :linkgit
-  postprocessor Git::Documentation::DocumentPostProcessor
 end
-- 
2.40.0+fc1
Message 1 of 1 in “doc: remove asciidoctor hack”
  1. doc: remove asciidoctor hackFelipe Contreras, Apr 24, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.