diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3doc.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3doc.cls | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index ed111045fbf..e1f1aad315d 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -1921,8 +1921,9 @@ \char_set_catcode_active:N \> \cs_new_protected:Npn \__codedoc_xmacro_code:n #1 { + \tl_clear:N \l__codedoc_tmpa_tl \tl_if_in:nnTF {#1} { < @ @ = } - { \__codedoc_xmacro_code:w #1 \q_stop } + { \__codedoc_xmacro_code:w #1 < @ @ = \q_recursion_tail > \q_recursion_stop } { \tl_set:Nn \l__codedoc_tmpa_tl {#1} \__codedoc_detect_internals:N \l__codedoc_tmpa_tl @@ -1930,21 +1931,21 @@ \tl_use:N \l__codedoc_tmpa_tl } } - \cs_new_protected:Npn \__codedoc_xmacro_code:w #1 < @ @ = #2 > #3 \q_stop + \cs_new_protected:Npn \__codedoc_xmacro_code:w #1 < @ @ = #2 > { - \tl_set:Nn \l__codedoc_tmpa_tl {#1} - \__codedoc_detect_internals:N \l__codedoc_tmpa_tl - \__codedoc_replace_at_at:N \l__codedoc_tmpa_tl - - \tl_gset:Nn \g__codedoc_module_name_tl {#2} - \tl_put_right:Nn \l__codedoc_tmpa_tl { < \text { \verbatim@font @ @ = #2 } > } - - \tl_set:Nn \l__codedoc_tmpb_tl {#3} + % Add code before <__codedoc=...> + \tl_set:Nn \l__codedoc_tmpb_tl {#1} \__codedoc_detect_internals:N \l__codedoc_tmpb_tl \__codedoc_replace_at_at:N \l__codedoc_tmpb_tl - \tl_put_right:No \l__codedoc_tmpa_tl { \l__codedoc_tmpb_tl } - - \tl_use:N \l__codedoc_tmpa_tl + \tl_put_right:NV \l__codedoc_tmpa_tl \l__codedoc_tmpb_tl + % Check for \q_recursion_tail + \quark_if_recursion_tail_stop_do:nn {#2} + { \tl_use:N \l__codedoc_tmpa_tl } + % Change module name and add <__codedoc=#2> to typeset output + \tl_gset:Nn \g__codedoc_module_name_tl {#2} + \tl_put_right:Nn \l__codedoc_tmpa_tl { < \text { \verbatim@font @ @ = #2 } > } + % Loop + \__codedoc_xmacro_code:w } \group_end: \iow_new:N \g__codedoc_func_iow |