summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty18
1 files changed, 10 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
index 55bd0e1464c..c66adca5c64 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
@@ -13,7 +13,7 @@
%%
%% Do not distribute a modified version of this file.
%%
-%% File: l3regex.dtx Copyright (C) 2011-2013 The LaTeX3 Project
+%% File: l3regex.dtx Copyright (C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{expl3}
-\GetIdInfo$Id: l3regex.dtx 5067 2014-06-06 16:51:35Z bruno $
+\GetIdInfo$Id: l3regex.dtx 5218 2014-07-17 14:23:10Z bruno $
{L3 Experimental regular expressions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -67,6 +67,7 @@
{ \__regex_class:NnnnN \c_true_bool { } { 1 } { 0 } \c_true_bool }
}
\int_new:N \l__regex_balance_int
+\tl_new:N \l__regex_cs_name_tl
\cs_new_protected:Npn \__regex_break_true:w
#1 \__regex_break_point:TF #2 #3 {#2}
\cs_new_protected:Npn \__regex_break_point:TF #1 #2 { #2 }
@@ -183,16 +184,17 @@
\int_compare:nNnT \l__regex_current_catcode_int = \c_zero
{
\group_begin:
- \__regex_single_match:
- \__regex_disable_submatches:
- \__regex_build_for_cs:n {#1}
- \bool_set_eq:NN \l__regex_saved_success_bool \g__regex_success_bool
- \exp_args:Nx \__regex_match:n
+ \tl_set:Nx \l__regex_cs_name_tl
{
\exp_after:wN \exp_after:wN
\exp_after:wN \cs_to_str:N
\tex_the:D \tex_toks:D \l__regex_current_pos_int
}
+ \__regex_single_match:
+ \__regex_disable_submatches:
+ \__regex_build_for_cs:n {#1}
+ \bool_set_eq:NN \l__regex_saved_success_bool \g__regex_success_bool
+ \exp_args:NV \__regex_match:n \l__regex_cs_name_tl
\if_meaning:w \c_true_bool \g__regex_success_bool
\group_insert_after:N \__regex_break_true:w
\fi:
@@ -2111,7 +2113,7 @@
\if_int_compare:w \c_one < 1#1 \exp_stop_f:
\__regex_replacement_put_submatch:n {#1}
\else:
- \__tl_build_one:n #1
+ \__tl_build_one:o { \token_to_str:N #1 }
\fi:
}
}