Re: [PATCH] manpage-bold-literal.xsl: provide namespaced template for "d:literal"
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Oct 31, 2019, 02:31 UTC
- Message-ID
- <20191031023150.mdbj74sthrftnqie@camp.crustytoothpaste.net>
- In-Reply-To
- <20191030204104.19603-1-martin.agren@gmail.com>
On 2019-10-30 at 20:41:04, Martin Ågren wrote:
Show 5 quoted lines
> I've kept thinking lately that "wow, are we behind on marking up stuff > to be monospaced/boldened"... > > I'm pretty sure about the background here, but I'm not at all sure > that this is the prettiest or correctest fix.
This fix is correct. Thanks for sending a patch for this, and sorry about regressing our bolding behavior.
Show 23 quoted lines
> diff --git a/Documentation/manpage-bold-literal.xsl b/Documentation/manpage-bold-literal.xsl > index 608eb5df62..172388d6cf 100644 > --- a/Documentation/manpage-bold-literal.xsl > +++ b/Documentation/manpage-bold-literal.xsl > @@ -1,11 +1,20 @@ > <!-- manpage-bold-literal.xsl: > special formatting for manpages rendered from asciidoc+docbook --> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > + xmlns:d="http://docbook.org/ns/docbook" > version="1.0"> > > <!-- render literal text as bold (instead of plain or monospace); > this makes literal text easier to distinguish in manpages > viewed on a tty --> > +<xsl:template match="d:literal"> > + <xsl:value-of select="$git.docbook.backslash"/> > + <xsl:text>fB</xsl:text> > + <xsl:apply-templates/> > + <xsl:value-of select="$git.docbook.backslash"/> > + <xsl:text>fR</xsl:text> > +</xsl:template> > + > <xsl:template match="literal">
If you want to avoid duplication, you can write the existing template as follows:
<xsl:template match="literal|d:literal">
That will match both literal and d:literal tags. You still need the namespace declaration you added, of course.
-- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204