summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3keys.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3keys.sty26
1 files changed, 14 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
index 673001477d5..82dc4a656f7 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3keys.dtx 3991 2012-07-16 19:00:35Z joseph $
+\GetIdInfo$Id: l3keys.dtx 4248 2012-09-29 19:55:27Z joseph $
{L3 Experimental key-value interfaces}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -73,7 +73,7 @@
\tl_replace_all:Nnn \l__keyval_sanitise_tl { , } { 9 }
\tl_clear:N \l__keyval_parse_tl
\exp_after:wN \__keyval_parse_elt:w \exp_after:wN
- \q_no_value \l__keyval_sanitise_tl 9 \q_nil 9
+ \q_nil \l__keyval_sanitise_tl 9 \q_recursion_tail 9 \q_recursion_stop
\exp_after:wN \group_end:
\l__keyval_parse_tl
}
@@ -81,18 +81,16 @@
\cs_new_protected:Npn \__keyval_parse_elt:w #1 ,
{
\tl_if_blank:oTF { \use_none:n #1 }
- { \__keyval_parse_elt:w \q_no_value }
+ { \__keyval_parse_elt:w \q_nil }
{
- \quark_if_nil:oF { \use_ii:nn #1 }
- {
- \__keyval_split_key_value:w #1 = = \q_stop
- \__keyval_parse_elt:w \q_no_value
- }
+ \quark_if_recursion_tail_stop:o { \use_ii:nn #1 }
+ \__keyval_split_key_value:w #1 = = \q_stop
+ \__keyval_parse_elt:w \q_nil
}
}
\cs_new_protected:Npn \__keyval_split_key_value:w #1 = #2 \q_stop
{
- \__keyval_split_key:w #1 \q_stop
+ \__keyval_split_key:n {#1}
\str_if_eq:nnTF {#2} { = }
{
\tl_put_right:Nx \l__keyval_parse_tl
@@ -110,11 +108,15 @@
}
\cs_new:Npn \__keyval_split_key_value:wTF #1 = #2#3 \q_stop
{ \tl_if_head_eq_meaning:nNTF {#3} \q_no_value }
-\cs_new_protected:Npn \__keyval_split_key:w #1 \q_stop
+\cs_new_protected:Npn \__keyval_split_key:n #1
{
- \tl_set:Nx \l__keyval_key_tl
- { \exp_after:wN \tl_trim_spaces:n \exp_after:wN { \use_none:n #1 } }
+ \str_if_eq_x:nnTF
+ { \exp_not:N \q_nil } { \exp_not:o { \use_none:nnn #1 \q_nil \q_nil } }
+ { \tl_set:Nx \l__keyval_key_tl { \exp_not:o { \use_ii:nnn #1 \q_nil } } }
+ { \__keyval_split_key:w #1 \q_stop }
}
+\cs_new_protected:Npn \__keyval_split_key:w \q_nil #1 \q_stop
+ { \tl_set:Nx \l__keyval_key_tl { \tl_trim_spaces:n {#1} } }
\cs_new_protected:Npn \__keyval_split_value:w #1 = =
{
\tl_put_right:Nx \l__keyval_parse_tl