aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-07-23 16:54:34 -0700
committerJunio C Hamano <gitster@pobox.com>2024-07-23 16:54:34 -0700
commit6fcd72d5adb7b95a1710929476a2b1392b04cb68 (patch)
treeeb3142135340854f8cb3e2f8ae1f8689bf3cc1fa
parentMerge branch 'ja/doc-markup-updates-fix' (diff)
parentDoc: fix Asciidoctor css workaround (diff)
downloadgit-6fcd72d5adb7b95a1710929476a2b1392b04cb68.tar.gz
git-6fcd72d5adb7b95a1710929476a2b1392b04cb68.zip
Merge branch 'js/doc-markup-updates-fix'
Work around asciidoctor's css that renders `monospace` material in the SYNOPSIS section of manual pages as block elements. * js/doc-markup-updates-fix: Doc: fix Asciidoctor css workaround asciidoctor: fix `synopsis` rendering
-rw-r--r--Documentation/Makefile6
-rw-r--r--Documentation/docinfo-html.in5
2 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index dc65759cb1..1bd23fbeef 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -204,12 +204,15 @@ ASCIIDOC_DOCBOOK = docbook5
ASCIIDOC_EXTRA += -acompat-mode -atabsize=8
ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions
ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;'
+ASCIIDOC_EXTRA += -adocinfo=shared
ASCIIDOC_DEPS = asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
DBLATEX_COMMON =
XMLTO_EXTRA += --skip-validation
XMLTO_EXTRA += -x manpage.xsl
endif
+ASCIIDOC_DEPS += docinfo.html
+
SHELL_PATH ?= $(SHELL)
# Shell quote;
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
@@ -338,6 +341,9 @@ clean:
$(RM) $(cmds_txt) $(mergetools_txt) *.made
$(RM) GIT-ASCIIDOCFLAGS
+docinfo.html: docinfo-html.in
+ $(QUIET_GEN)$(RM) $@ && cat $< >$@
+
$(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS)
$(QUIET_ASCIIDOC)$(TXT_TO_HTML) -d manpage -o $@ $<
diff --git a/Documentation/docinfo-html.in b/Documentation/docinfo-html.in
new file mode 100644
index 0000000000..fb3560eb92
--- /dev/null
+++ b/Documentation/docinfo-html.in
@@ -0,0 +1,5 @@
+<style>
+pre>code {
+ display: inline;
+}
+</style>