Skip to content

Commit

Permalink
fix: check for empty range
Browse files Browse the repository at this point in the history
- Remove \tl_use:N
- Fix #4.
  • Loading branch information
stone-zeng committed Aug 11, 2019
1 parent 28e7300 commit 783ca9b
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions source/zhlipsum.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ Copyright (C) 2017&ndash;2019 by Xiangdong Zeng <[email protected]>.
\@@_msg_new:nn { ctex-invalid-encoding }
{
Package~ option~ "encoding=#1"~ is~ in~ conflict~ with~ ctex's~
option~ "\tl_use:N \l__ctex_encoding_tl".\\\\
option~ "\l__ctex_encoding_tl".\\\\
Please~ check~ the~ package~ options.
}
\@@_msg_new:nn { invalid-encoding }
Expand Down Expand Up @@ -1172,15 +1172,18 @@ Copyright (C) 2017&ndash;2019 by Xiangdong Zeng <[email protected]>.
\zhlipsum_if_exist:nTF {#1}
{
\@@_parse_par:nn {#1} {#2}
\seq_pop_right:NN \l_@@_par_num_seq \l_@@_tmpa_tl
\tl_use:N \l_@@_before_tl
\seq_map_inline:Nn \l_@@_par_num_seq
\seq_if_empty:NF \l_@@_par_num_seq
{
\@@_use:nn {#1} {##1}
\tl_use:N \l_@@_inter_tl
\seq_pop_right:NN \l_@@_par_num_seq \l_@@_tmpa_tl
\l_@@_before_tl
\seq_map_inline:Nn \l_@@_par_num_seq
{
\@@_use:nn {#1} {##1}
\l_@@_inter_tl
}
\@@_use:nn {#1} { \l_@@_tmpa_tl }
\l_@@_after_tl
}
\@@_use:nn {#1} { \tl_use:N \l_@@_tmpa_tl }
\tl_use:N \l_@@_after_tl
}
{ \@@_error:nn { invalid-name } {#1} }
}
Expand All @@ -1195,10 +1198,10 @@ Copyright (C) 2017&ndash;2019 by Xiangdong Zeng <[email protected]>.
}
\@@_msg_new:nn { CJK-invalid-encoding }
{
The~ current~ CJK~ environment~ uses~ "\tl_use:N \CJK@@@@@enc"~
The~ current~ CJK~ environment~ uses~ "\CJK@@@@@enc"~
encoding,\\
but~ zhlipsum~ package~ has~ been~ loaded~ with~ the~ option~
"encoding=\tl_use:N \g_@@_encoding_tl".\\\\
"encoding=\g_@@_encoding_tl".\\\\
Please~ check~ the~ package~ options.
}
% \end{macrocode}
Expand Down

0 comments on commit 783ca9b

Please sign in to comment.