git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "Martin Ågren" <martin.agren@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH] manpage-bold-literal.xsl: provide namespaced template for "d:literal"
Date: Thu, 31 Oct 2019 02:31:51 +0000	[thread overview]
Message-ID: <20191031023150.mdbj74sthrftnqie@camp.crustytoothpaste.net> (raw)
In-Reply-To: <20191030204104.19603-1-martin.agren@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]

On 2019-10-30 at 20:41:04, Martin Ågren wrote:
>  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.

> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

  parent reply	other threads:[~2019-10-31  2:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 20:41 [PATCH] manpage-bold-literal.xsl: provide namespaced template for "d:literal" Martin Ågren
2019-10-30 21:24 ` Jeff King
2019-10-31  6:19   ` Martin Ågren
2019-10-31  2:31 ` brian m. carlson [this message]
2019-10-31  6:21   ` Martin Ågren
2019-11-02  5:45     ` Junio C Hamano
2019-10-31  6:22 ` [PATCH v2] manpage-bold-literal.xsl: match for namespaced "d:literal" in template Martin Ågren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191031023150.mdbj74sthrftnqie@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=martin.agren@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).