From e8d2e47b626b538386cc3f096aa544a6f2ca7ca7 Mon Sep 17 00:00:00 2001 From: John Collins Date: Fri, 4 Oct 2024 21:25:14 -0400 Subject: [PATCH] Correct regex --- lib/Biber.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Biber.pm b/lib/Biber.pm index 9fff72528..a7b30ae24 100644 --- a/lib/Biber.pm +++ b/lib/Biber.pm @@ -420,8 +420,12 @@ sub parse_ctrlfile { $logger->info("Reading '$ctrl_file_path'"); my $buf = slurp_switchr($ctrl_file_path)->$*; # Unicode NFD boundary, but not for filenames - leave these in OS form - $buf = join("\n", map {m/([^<]+)/ ? $_ : NFD($_)} split(/\R\z/, $buf)); - + # Ensure $buf ends in new line. + $buf = join("\n", + map {m/([^<]+)/ ? $_ : NFD($_)} + split(/\R/, $buf) + ) + ."\n"; # Read control file require XML::LibXML::Simple;