Skip to content

Commit 7f55cf4

Browse files
jonasgitster
authored andcommitted
Documentation: Fix man page breakage with DocBook XSL v1.72
From version 1.72 it will replace all dots in roff requests with U+2302 ("house" character), and add escaping in output for all instances of dot that are not in roff requests. This caused the ".ft" hack forcing monospace font in listingblocks to end up as "\&.ft" and being visible in the resulting man page. The fix adds a DOCBOOK_XSL_172 build variable that will disable the hack. To allow this variable to be defined in config.mak it also moves build variable handling below the inclusion of config.mak. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent cb5c49b commit 7f55cf4

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Documentation/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ man7dir=$(mandir)/man7
3737

3838
ASCIIDOC=asciidoc
3939
ASCIIDOC_EXTRA =
40-
ifdef ASCIIDOC8
41-
ASCIIDOC_EXTRA += -a asciidoc7compatible
42-
endif
4340
INSTALL?=install
4441
RM ?= rm -f
4542
DOC_REF = origin/man
@@ -52,6 +49,13 @@ DOCBOOK2X_TEXI=docbook2x-texi
5249
-include ../config.mak.autogen
5350
-include ../config.mak
5451

52+
ifdef ASCIIDOC8
53+
ASCIIDOC_EXTRA += -a asciidoc7compatible
54+
endif
55+
ifdef DOCBOOK_XSL_172
56+
ASCIIDOC_EXTRA += -a docbook-xsl-172
57+
endif
58+
5559
#
5660
# Please note that there is a minor bug in asciidoc.
5761
# The version after 6.0.3 _will_ include the patch found here:

Documentation/asciidoc.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ ifdef::backend-docbook[]
2323
endif::backend-docbook[]
2424

2525
ifdef::backend-docbook[]
26+
ifndef::docbook-xsl-172[]
2627
# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
28+
# v1.72 breaks with this because it replaces dots not in roff requests.
2729
[listingblock]
2830
<example><title>{title}</title>
2931
<literallayout>
@@ -36,6 +38,7 @@ ifdef::doctype-manpage[]
3638
endif::doctype-manpage[]
3739
</literallayout>
3840
{title#}</example>
41+
endif::docbook-xsl-172[]
3942
endif::backend-docbook[]
4043

4144
ifdef::doctype-manpage[]

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ all::
109109
#
110110
# Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8
111111
#
112+
# Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72.
113+
#
112114
# Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
113115
# MakeMaker (e.g. using ActiveState under Cygwin).
114116
#

0 commit comments

Comments
 (0)