File: 0001-Fix-regexp-syntax-for-Perl-5.22.patch

package info (click to toggle)
liblatex-decode-perl 0.04-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 168 kB
  • ctags: 14
  • sloc: perl: 1,070; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 1,065 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From e6a481d4cf632a837135937f4f0995b9fd69ab99 Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Sun, 27 Dec 2015 22:23:19 +0200
Subject: [PATCH] Fix regexp syntax for Perl 5.22

Unescaped left brace in regex is deprecated, passed through in regex

Bug-Debian: https://bugs.debian.org/809098
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=110678
---
 lib/LaTeX/Decode.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/LaTeX/Decode.pm b/lib/LaTeX/Decode.pm
index 7741405..92fef90 100644
--- a/lib/LaTeX/Decode.pm
+++ b/lib/LaTeX/Decode.pm
@@ -130,7 +130,7 @@ sub latex_decode {
         $text =~ s/\\not\\($NEG_SYMB_RE)/$NEGATEDSYMBOLS{$1}/ge;
         $text =~ s/\\textsuperscript{($SUPER_RE)}/$SUPERSCRIPTS{$1}/ge;
         $text =~ s/\\textsuperscript{\\($SUPERCMD_RE)}/$CMDSUPERSCRIPTS{$1}/ge;
-        $text =~ s/\\dings{([2-9AF][0-9A-F])}/$DINGS{$1}/ge;
+        $text =~ s/\\dings\{([2-9AF][0-9A-F])}/$DINGS{$1}/ge;
     }
 
     $text =~ s/(\\[a-zA-Z]+)\\(\s+)/$1\{\}$2/g;    # \foo\ bar -> \foo{} bar
-- 
2.6.4