From: "Martin Ågren" <martin.agren@gmail.com> To: git@vger.kernel.org Cc: Junio C Hamano <gitster@pobox.com>, "brian m. carlson" <sandals@crustytoothpaste.net>, Eric Sunshine <sunshine@sunshineco.com> Subject: [PATCH 2/2] asciidoctor-extensions: fix spurious space after linkgit in *.html Date: Sun, 10 Mar 2019 16:14:24 +0100 Message-ID: <bd8e8706fd30db7200c32570acf4aa3e5ca3fbbf.1552230490.git.martin.agren@gmail.com> (raw) In-Reply-To: <cover.1552230490.git.martin.agren@gmail.com> I really should have caught this when I wrote c3b4efa030 ("asciidoctor-extensions: fix spurious space after linkgit", 2019-02-27). Turns out that when we create html-files, we take a different path through this macro. So similar to c3b4efa030, we need to drop a "\n" which turns into a space before punctuation. Just like with c3b4efa030, note that if what follows is a word, not punctuation, the white space renders just fine. So constructions such as "see linkgit:foo[1] for more" still render as intended. 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 f7a5982f8b..0089e0cfb8 100644 --- a/Documentation/asciidoctor-extensions.rb +++ b/Documentation/asciidoctor-extensions.rb @@ -11,7 +11,7 @@ module Git def process(parent, target, attrs) if parent.document.basebackend? 'html' prefix = parent.document.attr('git-relative-html-prefix') - %(<a href="#{prefix}#{target}.html">#{target}(#{attrs[1]})</a>\n) + %(<a href="#{prefix}#{target}.html">#{target}(#{attrs[1]})</a>) elsif parent.document.basebackend? 'docbook' "<citerefentry>\n" \ "<refentrytitle>#{target}</refentrytitle>" \ -- 2.21.0
next prev parent reply other threads:[~2019-03-10 15:15 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 ` [PATCH v2 3/3] asciidoctor-extensions: fix spurious space after linkgit Martin Ågren 2019-02-28 23:50 ` [PATCH v2 0/3] " 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 ` Martin Ågren [this message] 2019-03-11 2:59 ` [PATCH 0/2] fix spurious space after linkgit, now in *.html 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=bd8e8706fd30db7200c32570acf4aa3e5ca3fbbf.1552230490.git.martin.agren@gmail.com \ --to=martin.agren@gmail.com \ --cc=git@vger.kernel.org \ --cc=gitster@pobox.com \ --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
git@vger.kernel.org list mirror (unofficial, one of many) This inbox may be cloned and mirrored by anyone: git clone --mirror https://public-inbox.org/git git clone --mirror http://ou63pmih66umazou.onion/git git clone --mirror http://czquwvybam4bgbro.onion/git git clone --mirror http://hjrcffqmbrq6wope.onion/git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V1 git git/ https://public-inbox.org/git \ git@vger.kernel.org public-inbox-index git Example config snippet for mirrors. Newsgroups are available over NNTP: nntp://news.public-inbox.org/inbox.comp.version-control.git nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git nntp://news.gmane.io/gmane.comp.version-control.git note: .onion URLs require Tor: https://www.torproject.org/ code repositories for the project(s) associated with this inbox: https://80x24.org/mirrors/git.git AGPL code for this site: git clone https://public-inbox.org/public-inbox.git