From nobody Sun Oct 5 14:38:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1583493478; cv=none; d=zohomail.com; s=zohoarc; b=QnPN85eaFIou4JZrLH0ODc1KrA7NIxmS34tj+mwKZys17f7HzOqSKpJUinXPvlazyp9A80r7MYO6q1aYyRfHthq1joNA+WsxQBydfDLycCvCLFcErlf/BKAYryDKUVn3LZ3oXAb2ezQhZiUVS4Gwtpm0lSJXtE2YRwAqLGfB//c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583493478; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nwDKZHHvTc1aVEH0nGRr033YOq+xaIEkMAUFu/T4EaE=; b=f3kgNI7yRbaH07lzSFF0Myo5HeTAJHGGEvQ74Y80hTYhcvCUOJ08UkKT2mLt0ZBmblXAEaHSNR8Qte2xVLytnQxPaVPrFLIx2cjLGDp0TGd20Gj66zxNJkA1DV/3pxO2isDj2us8LxZnT7DD4PGgbM3RDye1gUJeoOcpDrgSxa8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1583493478090563.6870577519012; Fri, 6 Mar 2020 03:17:58 -0800 (PST) Received: from localhost ([::1]:34938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAAzN-00007P-0c for importer@patchew.org; Fri, 06 Mar 2020 06:17:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39804) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAAsN-0004AV-Gh for qemu-devel@nongnu.org; Fri, 06 Mar 2020 06:10:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAAsI-0005fJ-5R for qemu-devel@nongnu.org; Fri, 06 Mar 2020 06:10:39 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:35576) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAAsH-0005cf-SW for qemu-devel@nongnu.org; Fri, 06 Mar 2020 06:10:38 -0500 Received: by mail-wm1-x331.google.com with SMTP id m3so1937287wmi.0 for ; Fri, 06 Mar 2020 03:10:37 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id y10sm12553029wma.26.2020.03.06.03.10.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Mar 2020 03:10:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=nwDKZHHvTc1aVEH0nGRr033YOq+xaIEkMAUFu/T4EaE=; b=SLV2a73BLGk64Vok3tBpLicIgp068BbQC7b88H4U2CLdl37REX7pCYCI7kk2tAyqSV 4mrA7LH4V+WBI/b8ILDxXybOhTmFCeaL8Cv7zeANZqCatKh9bVnS19T56MxJx6NbwDEv JDyFecaTjAq70bjo8qzbXdPLzQWBxFGA0nJnKFxNF2iqCWhPmcpYZ9zR3XBHjQ3gY6r2 9NUqoLHsPGwwR1pdp44Mks+3ETlWjzWdqRGCbRhcYUhlntw/4saJREXLE9IdgMUMkWxU NlpbT6Kig95wzTNCnpNiS+FObAdp2F2+JuCOEJhl6AosY80kG0UO4mIXvwev77cVpfRD NVZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nwDKZHHvTc1aVEH0nGRr033YOq+xaIEkMAUFu/T4EaE=; b=YlFqonA71i2xTafIF0vY4qisGUwp5g6Rme4wt5vmtx0e7NxrCtHqhqhkNuhcWbe42G sBxcLapCI4cQKbnPtRXbV3iuBB98xVHI6iJz7QoF3TmwYXLiWUyweEceBWGE0sMVtab7 wguVsuD+33e4W3/dWd+KRRIlLRI3SX+zat0cr046SdqUQ3RiCBLLxkxi8Kd5TYCFXyl6 82IaLeyT9gVxCyP/XjVUdHNTk9h32PMAttPFy7UNaj9lCsbUiKwzGiU/+TAQ9gCjt67S OgCjbnFUhjvsCVgB6ZRjHPa1szwGrN6l9EOILleRvrTJErAyCjgsDoe0eXBRc6RDhPcE oBZQ== X-Gm-Message-State: ANhLgQ0v2mezBlXtpZnZ6JB+EuGpfE3jsmXDt8ghNW9tDqGdCf3K9ezS FDhSgsgIABO4JiHg+m/YvKi0GYV82cn2Ig== X-Google-Smtp-Source: ADFU+vur8Ka+Qo2x/cjBLrzg/Nl2VpwbkcpqF/O2jszYOXUWrIzOlvnbjRXLtWI4IWNtpzCL5To/IQ== X-Received: by 2002:a1c:8041:: with SMTP id b62mr3413828wmd.76.1583493034579; Fri, 06 Mar 2020 03:10:34 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/33] doc/scripts/hxtool.py: Strip trailing ':' from DEFHEADING/ARCHHEADING Date: Fri, 6 Mar 2020 11:09:48 +0000 Message-Id: <20200306110959.29461-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200306110959.29461-1-peter.maydell@linaro.org> References: <20200306110959.29461-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::331 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) In hxtool files, section headings defined with the DEFHEADING and ARCHHEADING macros have a trailing ':' DEFHEADING(Standard options:) This is for the benefit of the --help output. For consistency with the rest of the rST documentation, strip any trailing ':' when we construct headings with the Sphinx hxtool extension. This makes the table of contents look neater. This only affects generation of documentation from qemu-options.hx, which we will start doing in a later commit. Signed-off-by: Peter Maydell Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Message-id: 20200228153619.9906-23-peter.maydell@linaro.org --- docs/sphinx/hxtool.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/sphinx/hxtool.py b/docs/sphinx/hxtool.py index 5d6736f3002..7dd223fe362 100644 --- a/docs/sphinx/hxtool.py +++ b/docs/sphinx/hxtool.py @@ -60,8 +60,9 @@ def parse_defheading(file, lnum, line): # empty we ignore the directive -- these are used only to add # blank lines in the plain-text content of the --help output. # - # Return the heading text - match =3D re.match(r'DEFHEADING\((.*)\)', line) + # Return the heading text. We strip out any trailing ':' for + # consistency with other headings in the rST documentation. + match =3D re.match(r'DEFHEADING\((.*?):?\)', line) if match is None: serror(file, lnum, "Invalid DEFHEADING line") return match.group(1) @@ -72,8 +73,9 @@ def parse_archheading(file, lnum, line): # though note that the 'some string' could be the empty string. # As with DEFHEADING, empty string ARCHHEADINGs will be ignored. # - # Return the heading text - match =3D re.match(r'ARCHHEADING\((.*),.*\)', line) + # Return the heading text. We strip out any trailing ':' for + # consistency with other headings in the rST documentation. + match =3D re.match(r'ARCHHEADING\((.*?):?,.*\)', line) if match is None: serror(file, lnum, "Invalid ARCHHEADING line") return match.group(1) --=20 2.20.1