From: Mauro Carvalho Chehab Date: Thu, 25 Mar 2021 10:38:24 +0000 (+0100) Subject: get_abi.pl: fix xref boundaries X-Git-Tag: accepted/tizen/unified/20230118.172025~7279^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50ebf8f4933ec27f0dc8c3b46c72894b14de0018;p=platform%2Fkernel%2Flinux-rpi.git get_abi.pl: fix xref boundaries There are some issues with the regex that seeks for What: cross references: basically, it is mis-identifying the start and the end boundaries of the regex, which causes :ref: to be inseerted for the wrong symbols at the wrong places. Fix it. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/79a14d2518499b76931b5f29c50979987108152d.1616668017.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet --- diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index 3c82cd1..e870282 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -281,8 +281,11 @@ sub create_labels { # Outputs the book on ReST format # -# \b doesn't work well with paths. So, we need to define something else -my $bondary = qr { (?{label})) { my $xref = $s; $xref =~ s/$symbols/\\$1/g; $xref = ":ref:`$xref <" . $data{$s}->{label} . ">`"; - $desc =~ s,$bondary$s$bondary,$xref,g; + $desc =~ s,$start$s$bondary,$1$xref$2,g; } }