From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E89BC433FC for ; Thu, 25 Mar 2021 10:39:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F47F61A1A for ; Thu, 25 Mar 2021 10:39:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230354AbhCYKjM (ORCPT ); Thu, 25 Mar 2021 06:39:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:53538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbhCYKic (ORCPT ); Thu, 25 Mar 2021 06:38:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D49E561A27; Thu, 25 Mar 2021 10:38:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616668712; bh=KwApZJ8/w2jfzVZqqaL0ukDm8pZipSoobTwxn4qEIQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cJCSdHy+9UxKXeOk2/OoPxU+d6t4na3ea0UkLRTbJQsHdASjpYJNY2jpQWACJw7sE 9b0g77BMrDyMGSEOOy1nMYZkoZouwgxMyruYM5qS4MBRJ+glH5gz17FEYOIi4DsFfo ALDqSR3oJ/2eKSDQuy4ONGY2UsheVE13tD+QnyHoDqta2NYKU0OgaijIG11jfGajqk ckZfoWd9fsajcl9mWxf4S0GoGf3nVSI8VfwZJNVk85L9Fn/k0eGWPxuB4rCeZGq8fx jLKPrt15SRS5A2xeyJ/ku/Iw9Nd5vvdrzuWA3bAn66WS0iA3z5H5wxUymnPWAfVIKB JWjFSheHH4xKQ== Received: by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1lPNNl-001AvS-5R; Thu, 25 Mar 2021 11:38:29 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet , Andrew Morton Cc: Mauro Carvalho Chehab , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/7] scripts: get_abi.pl: better handle escape chars on what: Date: Thu, 25 Mar 2021 11:38:22 +0100 Message-Id: <29cb56def89b508fe605bcd2ba74a4376cc08e35.1616668017.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The parser for the symbols defined on What: doesn't cover all chars that need to be scaped, like '{' and '}'. Change the logic to be more generic, and ensure that the same regex will be used on both What: and when parsing the cross-references. Signed-off-by: Mauro Carvalho Chehab --- scripts/get_abi.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index 92d9aa6cc4f5..a9348b9bdaa4 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -283,6 +283,7 @@ sub create_labels { # \b doesn't work well with paths. So, we need to define something else my $bondary = qr { (? $len); } @@ -395,7 +396,7 @@ sub output_rest { if (defined($data{$s}) && defined($data{$s}->{label})) { my $xref = $s; - $xref =~ s/([\x00-\x1f\x21-\x2f\x3a-\x40\x7b-\xff])/\\$1/g; + $xref =~ s/$symbols/\\$1/g; $xref = ":ref:`$xref <" . $data{$s}->{label} . ">`"; $desc =~ s,$bondary$s$bondary,$xref,g; -- 2.30.2