From patchwork Sun Mar 10 15:14:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_=C3=85gren?= X-Patchwork-Id: 10846321 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29FEE922 for ; Sun, 10 Mar 2019 15:15:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 130ED28DEE for ; Sun, 10 Mar 2019 15:15:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 062FB28DF5; Sun, 10 Mar 2019 15:15:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A622028DEE for ; Sun, 10 Mar 2019 15:15:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726597AbfCJPPC (ORCPT ); Sun, 10 Mar 2019 11:15:02 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39074 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbfCJPPC (ORCPT ); Sun, 10 Mar 2019 11:15:02 -0400 Received: by mail-lj1-f196.google.com with SMTP id g80so1859666ljg.6 for ; Sun, 10 Mar 2019 08:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cY/FZcaHuvJhu3rd71bsbVN4FHPi71y8DfLxkTX8Lzs=; b=LqyqaFjmNhZz15TrtVRAS0T8wMMDL4PTk29q1U7HtIfGSosaX/yXEs5ST9Xlb5DJFU Z6bzDmVPmnfTepGQ1oRjY0dbw0HgbqiBrfxEsqleinPGarRJA8ak9GdoinoNN+xquGGn rrupXyV9Zgl+QXjlgYuGcNNIbnXVqyR1bPIAZpC1FaoWEqFyvRdKPkB4Wdsv+0+njxoC +Hv3BLQUNAin4yzlENRKA3vDryQRajF8yWBYyXC3+peiW2/bN/PtybOfwxC2NbUJMV/k tmngO1yxXMIZQvIdOvGd09pGBMK+RVcd4WObHvwqX5NHkgs1yNWzDRfUbANx37J0ecZR Z9VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cY/FZcaHuvJhu3rd71bsbVN4FHPi71y8DfLxkTX8Lzs=; b=IJnCvLvAh3SYdqr0V32hwDh3WApEXiLjNEv0BEHKYC78wP36hOf2gjp+g9EUy+Yl/Q 7sePmliEFxBuHEYnclA0qgb02VUW5/Ibt1obtoGz0vScYM+1+w3Cp8q99UtoyqqiJMIw oBoyVyqCoZOtmKCzvgbJwWpCsTKxaMBNV0v36273yw6dYmgZTGCfp+XcXWdDpP0xaAWG AGHTO2qobHj/2mlvr6+QYfV+SDfps2Oejuq3A/nhVllupxwceVZ4Egg4/40Ag41A2aSQ mDRdnHuPlQlvKjZB4d6dUdSz+DqP65FFp7uidCYsG6jXw6LDWmootRYHVypSJdQaGldS v9Jw== X-Gm-Message-State: APjAAAWSk3wtBPjgT2uqdVK7VP5kVZHfxyMaQwiAY4GgMIGKmYa9KRdW nngWxcSdaoSYgge/UvMDira98stF X-Google-Smtp-Source: APXvYqzQipPiGcdDAIxBVmw94pjJfBGVY6qiAeRzhj4DqGeZCSgSpuf+pLHNYglIT3vg2652H8Iupg== X-Received: by 2002:a2e:9150:: with SMTP id q16mr14274938ljg.18.1552230899244; Sun, 10 Mar 2019 08:14:59 -0700 (PDT) Received: from localhost.localdomain (31-211-229-121.customers.ownit.se. [31.211.229.121]) by smtp.gmail.com with ESMTPSA id v20sm568292ljv.83.2019.03.10.08.14.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2019 08:14:58 -0700 (PDT) From: =?utf-8?q?Martin_=C3=85gren?= To: git@vger.kernel.org Cc: Junio C Hamano , "brian m. carlson" , Eric Sunshine Subject: [PATCH 2/2] asciidoctor-extensions: fix spurious space after linkgit in *.html Date: Sun, 10 Mar 2019 16:14:24 +0100 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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') - %(#{target}(#{attrs[1]})\n) + %(#{target}(#{attrs[1]})) elsif parent.document.basebackend? 'docbook' "\n" \ "#{target}" \