git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Martin Ågren" <martin.agren@gmail.com>
To: git@vger.kernel.org
Cc: "brian m . carlson" <sandals@crustytoothpaste.net>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH v2 3/3] asciidoctor-extensions: fix spurious space after linkgit
Date: Wed, 27 Feb 2019 19:17:54 +0100	[thread overview]
Message-ID: <e1021ad4a97a78e7428fcdfbf2af7196a0c8d340.1551290936.git.martin.agren@gmail.com> (raw)
In-Reply-To: <cover.1551290936.git.martin.agren@gmail.com>

When we render, e.g., "linkgit:gitglossary[7]." with Asciidoctor, we get
"gitglossary(7) ." with a space between the linkgit macro expansion and
the punctuation. We can fix this by dropping the trailing newline after
we've turned `linkgit:foo[bar]` into `<citerefentry>..</citerefentry>`.

The diff produced by `USE_ASCIIDOCTOR=Yes ./doc-diff HEAD^ HEAD` is
almost 6000 lines large and shows how this fixes "git-foo(x) ,", "(see
git-bar(y) )" and so on. One might wonder whether this also turns, e.g.,
"see linkgit:foo[1] for more" into "see foo(1)for more", but no. We get
"...</citerefentry> for more" in the XML, see, e.g., git-am.xml, so the
space ends up in git-am.1 just fine.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 Documentation/asciidoctor-extensions.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb
index ec83b4959e..f7a5982f8b 100644
--- a/Documentation/asciidoctor-extensions.rb
+++ b/Documentation/asciidoctor-extensions.rb
@@ -16,7 +16,7 @@ module Git
           "<citerefentry>\n" \
             "<refentrytitle>#{target}</refentrytitle>" \
             "<manvolnum>#{attrs[1]}</manvolnum>\n" \
-          "</citerefentry>\n"
+          "</citerefentry>"
         end
       end
     end
-- 
2.21.0


  parent reply	other threads:[~2019-02-27 18:18 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 20:02 [PATCH 0/3] asciidoctor-extensions: fix spurious space after linkgit Martin Ågren
2019-02-25 20:02 ` [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages Martin Ågren
2019-02-25 20:08   ` Eric Sunshine
2019-02-25 20:28     ` Martin Ågren
2019-02-25 21:00       ` Eric Sunshine
2019-02-26  5:59         ` Martin Ågren
2019-02-26 12:47           ` Eric Sunshine
2019-02-27 18:19             ` Martin Ågren
2019-02-25 20:02 ` [PATCH 2/3] Documentation/Makefile: add missing dependency on asciidoctor-extensions Martin Ågren
2019-02-25 20:02 ` [PATCH 3/3] asciidoctor-extensions: fix spurious space after linkgit Martin Ågren
2019-02-26  3:20   ` brian m. carlson
2019-02-26  3:22 ` [PATCH 0/3] " brian m. carlson
2019-02-26  6:03   ` Martin Ågren
2019-02-27 18:17     ` [PATCH v2 " Martin Ågren
2019-02-27 18:17       ` [PATCH v2 1/3] Documentation/Makefile: add missing xsl dependencies for manpages Martin Ågren
2019-02-27 18:17       ` [PATCH v2 2/3] Documentation/Makefile: add missing dependency on asciidoctor-extensions Martin Ågren
2019-02-27 18:17       ` Martin Ågren [this message]
2019-02-28 23:50       ` [PATCH v2 0/3] asciidoctor-extensions: fix spurious space after linkgit brian m. carlson
2019-03-03  1:25         ` Junio C Hamano
2019-03-10 15:14           ` [PATCH 0/2] fix spurious space after linkgit, now in *.html Martin Ågren
2019-03-10 15:14             ` [PATCH 1/2] Documentation/Makefile: add missing dependencies on asciidoctor-extensions Martin Ågren
2019-03-10 15:14             ` [PATCH 2/2] asciidoctor-extensions: fix spurious space after linkgit in *.html Martin Ågren
2019-03-11  2:59             ` [PATCH 0/2] fix spurious space after linkgit, now " Jeff King
2019-03-11  5:47               ` Martin Ågren
2019-03-11  3:02             ` Junio C Hamano
2019-03-11  5:40               ` Martin Ågren
2019-03-11  9:24                 ` Junio C Hamano
2019-03-11  9:26                   ` [PATCH v3 1/3] Documentation/Makefile: add missing xsl dependencies for manpages Junio C Hamano
2019-03-11  9:26                     ` [PATCH v3 2/3] Documentation/Makefile: add missing dependency on asciidoctor-extensions Junio C Hamano
2019-03-11  9:26                     ` [PATCH v3 3/3] asciidoctor-extensions: fix spurious space after linkgit Junio C Hamano
2019-03-11 11:02                   ` [PATCH 0/2] fix spurious space after linkgit, now in *.html 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=e1021ad4a97a78e7428fcdfbf2af7196a0c8d340.1551290936.git.martin.agren@gmail.com \
    --to=martin.agren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    --cc=sunshine@sunshineco.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).