From fef7fecf00918d5abb08d15ce179cf56fd70987b Mon Sep 17 00:00:00 2001 From: Bruno Le Floch Date: Wed, 29 Nov 2017 11:32:27 -0500 Subject: [PATCH] Avoid a \tex_lowercase:D in favor of a bit more expansion --- l3experimental/l3str/l3str-convert.dtx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/l3experimental/l3str/l3str-convert.dtx b/l3experimental/l3str/l3str-convert.dtx index 9873b985c8..6d60b1f686 100644 --- a/l3experimental/l3str/l3str-convert.dtx +++ b/l3experimental/l3str/l3str-convert.dtx @@ -1560,14 +1560,12 @@ % If followed by an end-of-line character, the backslash and the % end-of-line are ignored. If followed by anything else, the backslash % is ignored, raising the error flag. -%^^A Be paranoid: \tex_lowercase:D is unsafe. % \begin{macrocode} %<*string> \group_begin: - \char_set_lccode:nn {`\*} {`\\} \char_set_catcode_other:N \^^J \char_set_catcode_other:N \^^M - \tex_lowercase:D + \cs_set_protected:Npn \@@_tmp:w #1 { \cs_new_protected:Npn \@@_convert_unescape_string: { @@ -1584,15 +1582,17 @@ \tl_gset:Nx \g_@@_result_tl { \exp_after:wN \@@_unescape_string_loop:wNNN - \g_@@_result_tl * ?? { ? \__prg_break: } + \g_@@_result_tl #1 ?? { ? \__prg_break: } \__prg_break_point: } \@@_if_flag_error:nnx { str_byte } { non-byte } { string } \@@_if_flag_error:nnx { str_error } { unescape-string } { } \group_end: } - \cs_new:Npn \@@_unescape_string_loop:wNNN #1 *#2#3#4 } + \exp_args:No \@@_tmp:w { \c_backslash_str } + \exp_last_unbraced:NNNNo + \cs_new:Npn \@@_unescape_string_loop:wNNN #1 \c_backslash_str #2#3#4 { \@@_filter_bytes:n {#1} \use_none:n #4