SHA256
1
0
forked from pool/texlive
Dr. Werner Fink 2018-03-15 10:46:19 +00:00 committed by Git OBS Bridge
parent 75a6d08538
commit 0ab7f0c8b5

View File

@ -1,24 +1,17 @@
Fun with Perl 5.30
---
lib/Biber/LaTeX/Recode.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
lib/Biber/LaTeX/Recode.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- lib/Biber/LaTeX/Recode.pm
+++ lib/Biber/LaTeX/Recode.pm 2018-03-15 08:49:32.341586613 +0000
@@ -312,9 +312,14 @@ sub latex_decode {
#
@@ -313,7 +313,7 @@ sub latex_decode {
# Workaround perl's lack of variable-width negative look-behind -
# Reverse string (and therefore some of the Re) and use variable width negative look-ahead
+ # Careful here - reversing puts any combining chars before the char so \X can't be used
$text = reverse $text;
- $text =~ s/}(\pM+\pL){(?!\pL+\\)/$1/g;
+ $text =~ s/\}(\pM*\pL)\{(?!(?:\}[^}]+\{)*\pL+\\)/$1/g;
+ $text =~ s/}(\pM+\pL)\{(?!\pL+\\)/$1/g;
$text = reverse $text;
+ # Put brace markers back after doing the brace elimination as we only want to eliminate
+ # braces introduced as part of decoding, not explicit braces in the data
+ $text =~ s/\x{1f}/{/g;
+ $text =~ s/\x{1e}/}/g;
# Replace verbatim field markers
$text =~ s/([a-f0-9]{32})/$saveverb->{$1}/gie;