Open svarshavchik opened 3 years ago
I can duplicate this bug, which also appears in version 1.79.1. Line break management in the manpage stylesheet is tricky. The bug is in manpages/html-synop.xsl, in the template with match="classsynopsis" mode="cpp" in this case (and in the other language modes too). At the end of the template where it has:
< /pre><xsl:text/><xsl:text>.fi </text>
that should be:
< /pre><xsl:text> </text><xsl:text>.fi </text>
Fixing this in the source is more complicated, though, because the html-synop.xsl stylesheet file is generated by the DocBook XSL build process, so I'll have to trace through that process to see where this is going wrong. However, if you need an immediate fix, copy that template to a customization layer and make this change as a workaround.
I traced the problem in the build to xsl/tools/xsl/build/html2roff.xsl. Every instance of this:
<xsl:element name="xsl:text"> </xsl:element>
should be replaced with:
<xsl:element name="xsl:text"><xsl:text> </xsl:text></xsl:element>
That's because a white-space-only node is not preserved unless it is inside <xsl:text>.
Using 1.79.2 stylesheets to generate man pages (http://cdn.docbook.org/release/xsl-nons/current//manpages/docbook.xsl) from the following:
This results in the following formatted man page:
The troff ".fi" instruction is leaking. The raw troff source that came out was:
Seems like there's a missing newline somewhere.