Skip to content

Commit

Permalink
Merge branch 'ma/asciidoctor-build-fixes'
Browse files Browse the repository at this point in the history
A topic to optionally build with meson, which has graduated to
'master' recently, broke Documentation pipeline with asciidoctor
for the normal Makefile build as well as meson-based one, which
have been corrected.

* ma/asciidoctor-build-fixes:
  asciidoctor-extensions.rb.in: inject GIT_DATE
  asciidoctor-extensions.rb.in: add missing word
  asciidoctor-extensions.rb.in: delete existing <refmiscinfo/>
  • Loading branch information
gitster committed Dec 23, 2024
2 parents f074cde + beb8081 commit f74eae3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Documentation/asciidoctor-extensions.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ module Git
class DocumentPostProcessor < Asciidoctor::Extensions::Postprocessor
def process document, output
if document.basebackend? 'docbook'
output = output.sub(/<refmiscinfo class="source">.*?<\/refmiscinfo>/, "")
output = output.sub(/<refmiscinfo class="manual">.*?<\/refmiscinfo>/, "")
output = output.sub(/<date>.*?<\/date>/, "<date>@GIT_DATE@</date>")
new_tags = "" \
"<refmiscinfo class=\"source\">@GIT_VERSION@</refmiscinfo>\n" \
"<refmiscinfo class=\"source\">Git @GIT_VERSION@</refmiscinfo>\n" \
"<refmiscinfo class=\"manual\">Git Manual</refmiscinfo>\n"
output = output.sub(/<\/refmeta>/, new_tags + "</refmeta>")
end
Expand Down

0 comments on commit f74eae3

Please sign in to comment.