From patchwork Mon Feb 25 20:02:40 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: 10829081 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 18E201390 for ; Mon, 25 Feb 2019 20:03:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0ADF92B204 for ; Mon, 25 Feb 2019 20:03:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F335C2BA67; Mon, 25 Feb 2019 20:03:17 +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 A6A222B204 for ; Mon, 25 Feb 2019 20:03:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727258AbfBYUDQ (ORCPT ); Mon, 25 Feb 2019 15:03:16 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:37062 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726740AbfBYUDP (ORCPT ); Mon, 25 Feb 2019 15:03:15 -0500 Received: by mail-lf1-f67.google.com with SMTP id z196so7154426lff.4 for ; Mon, 25 Feb 2019 12:03:14 -0800 (PST) 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=lm3VpTi4rV0BJJp9W7KdITBxIGnT6raINZ5B1Q+EoOQ=; b=HkVHLGfpSDhrC9W69zeDkZd+hmUAA5qNmv1V4Lu6ushYivoot3ccdCSM5TbM9l1eGH Ui2a2BPK9TmPhf6UxIKsqk0Jer0q0K6R86E0XwqpFCB9jjAJodVsp6XYkuG++TCoB0F0 8nHGWVwWN86oLgXgJpRDz1WfF5mCOxXNoHF2t0/BkYbx2n9Q8qIcqMLNhytAiKF7A0Cd 0Gwp6koj/PCJ7E2xNPcvEoK65FwgVpzgNj2wFoOAu1LYv9gk77+zG2EMMFBL3qYd0FG4 csDtF6094NPsznlWthkgBjGyocTbmE9cvbsRhkU2vGT8eZcO+E5uB0A5zYnGaMMR/ewI xJdQ== 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=lm3VpTi4rV0BJJp9W7KdITBxIGnT6raINZ5B1Q+EoOQ=; b=GHT/uhYOsUGpnKtnag/fPQvXllo3eBCol4/5MqXym374te04jLwXapbKl5Yenq1jEm C1Nj1DIgxjtjT2O8xOExdJiU8jyn9T6E5Ttn/6p9wQYCnHlACvXw+hVc+qAIsoF256nY oJGhgQ5s+i/Cy5zoiQFXaQY/nbnpgGokG/durKIIZ3ay8PAx7cTuUujCME8rRk6nzbRl cqW50oUWJG5EnwIdfestDdxmzGB8BeiNFO4Ny975lAOPIj5yg4djV+1vqiJH78oO3yW2 zVNWq6TYZyDdNkF3iekEobwEqfoShWgoNmEH8S6IeX7eWonIbMQfeqgWUZr2xxfd/fO1 wGAg== X-Gm-Message-State: AHQUAuYkv4IR2lxpvLvW9+6ACaHkmVchiIEK62lqaPC+voyMLrHq5gEg 6ImeMPL19G0ToSwXyqNz/F8vdtJZ X-Google-Smtp-Source: AHgI3Ibh2xuN2zvnrIDAC7TskhMZzwHcbMxyHmTMxKSkAsO2ilR9tG/2bSjZDfNlRBEoLOzwAHYUjQ== X-Received: by 2002:ac2:514d:: with SMTP id q13mr11130737lfd.30.1551124993337; Mon, 25 Feb 2019 12:03:13 -0800 (PST) Received: from localhost.localdomain (31-211-229-121.customers.ownit.se. [31.211.229.121]) by smtp.gmail.com with ESMTPSA id c22sm2977168lfi.27.2019.02.25.12.03.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 12:03:12 -0800 (PST) From: =?utf-8?q?Martin_=C3=85gren?= To: git@vger.kernel.org Cc: "brian m. carlson" Subject: [PATCH 3/3] asciidoctor-extensions: fix spurious space after linkgit Date: Mon, 25 Feb 2019 21:02:40 +0100 Message-Id: <41d9ea21c37a634b2310b5b2f68935bcd612665c.1551123979.git.martin.agren@gmail.com> 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 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 `..`. 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 "... 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 --- 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 "\n" \ "#{target}" \ "#{attrs[1]}\n" \ - "\n" + "" end end end