From patchwork Mon Jan 5 14:10:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Wu X-Patchwork-Id: 5568291 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C63B79F357 for ; Mon, 5 Jan 2015 14:10:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB0A320165 for ; Mon, 5 Jan 2015 14:10:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C2AC20154 for ; Mon, 5 Jan 2015 14:10:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753338AbbAEOKR (ORCPT ); Mon, 5 Jan 2015 09:10:17 -0500 Received: from lekensteyn.nl ([178.21.112.251]:52995 "EHLO lekensteyn.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753236AbbAEOKP (ORCPT ); Mon, 5 Jan 2015 09:10:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lekensteyn.nl; s=s2048-2014-q3; h=Message-Id:Date:Subject:To:From; bh=LFKzn7uwGltV5a+IIaqlDSnoA1L3CQ90OJjRS1huw70=; b=Bpk/sQFWorn9zjCJWspNa1no/MSYP+WcYbIR2pWe018iMezZYzb3xOnoXr+cnZQ7cQr21fM+Un1j9Ac4lUIz0yOGck+CgtFPtfxNcPUoj4aa81vDiF718lh3+TDvEOeNdecY/zHfGgZEvf7/t3DHX2AtR2rbR8gHP4K3siABwUABiZcxiQIFFN8sXfKVVBFQO70eo7i2+SPUxHdbscVePYwkGCbmPR5f995Ac8f6JARNelTuq/vo8zWczEePwlVIbkFfz8S639fiagEJl+wOy5K0eYvr+WJkxhVibURrWi1/DkTnm6hVWqqaBikWJEDpqoYYvdJ7JCH0jKPoSdhoiA==; Received: by lekensteyn.nl with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1Y88MH-0006Y6-5u for linux-btrfs@vger.kernel.org; Mon, 05 Jan 2015 15:10:13 +0100 From: Peter Wu To: linux-btrfs@vger.kernel.org Subject: [PATCH] Documentation: fix broken conversion Date: Mon, 5 Jan 2015 15:10:09 +0100 Message-Id: <1420467009-11738-1-git-send-email-peter@lekensteyn.nl> X-Mailer: git-send-email 2.2.1 X-Spam-Score: 0.0 (/) X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes various formatting issues: Fixes quoting issues in various manpages. Before/After excerpts for mkfs.btrfs(8), btrfs-qgroup(8): mkfs.btrfs [-A|--alloc-start ''] mkfs.btrfs [-A|--alloc-start ] id 0/'' id 0/ If multiple ''s is given, use comma to separate. If multiple s is given, use comma to separate. The one that is most apparent is the removal of text in btrfs-subvolume(8) and others. Before/After: list [options] [-G ] [-C ] [--sort=rootid,gen,ogen,path] list [options] [-G [+|-]] [-C [+|-]] [--sort=rootid,gen,ogen,path] create [-i ] create [-i ] [] This happens because `` was replaced by `''` in the sed expression, which is then treated as a constrained quote. As a result, the `[...]` before the string gets interpreted as "quoted text attributes". In this patch, the sed expression is dropped and asciidoc is configured to recognize `<...>` as a unconstrained quoted string (such that `s` is correctly emphasized) and to avoid adding quotes in contexts where it is not needed. A remaining problem is that some texts (the one between brackets) do not add the emphasis for `<...>`. While this could be solved by replacing `[` and `]` with `[` and `]` using sed, it introduces formatting problems in btrfs-zero-log(8) because the context is ignored. Signed-off-by: Peter Wu --- Documentation/Makefile | 8 +++----- Documentation/asciidoc.conf | 6 ++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index ef4f1bd..72ab77b 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -113,10 +113,8 @@ clean: $(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< %.xml : %.txt asciidoc.conf - $(QUIET_ASCIIDOC)$(RM) $@.tmp[12] $@ && \ - sed -e "s/\(<[^>]\+>\)/'\1'/g" < $< > $@.tmp1 && \ + $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \ $(ASCIIDOC_EXTRA) -abtrfs_version=$(BTRFS_VERSION) \ - -o $@.tmp2 $@.tmp1 && \ - mv $@.tmp2 $@ && \ - rm -f -- $@.tmp1 + -o $@+ $< && \ + mv $@+ $@ diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf index 313f185..1ea7459 100644 --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@ -10,6 +10,12 @@ [macros] (?su)[\\]?(?Plinkbtrfs):(?P\S*?)\[(?P.*?)\]= +[tags] +bracket-emphasis={1?[{1}]}<|> + +[quotes] +<|>=#bracket-emphasis + [attributes] asterisk=* plus=+