Skip to content

Commit

Permalink
Store renderers and renderer prototypes in token lists, not a prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Apr 22, 2024
1 parent c131de0 commit cb15454
Showing 1 changed file with 20 additions and 34 deletions.
54 changes: 20 additions & 34 deletions markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -20158,10 +20158,6 @@ following text:
\tl_tail:n { #1 }
}
}
\tl_new:N
\l_@@_renderer_definition_tl
\prop_new:N
\g_@@_renderer_definitions_prop
\bool_new:N
\g_@@_appending_renderer_bool
\cs_new:Nn \@@_define_renderer:nNn
Expand All @@ -20171,23 +20167,21 @@ following text:
{
#1 .code:n = {
\tl_set:Nn
\l_@@_renderer_definition_tl
\l_tmpa_tl
{ ##1 }
\regex_replace_all:nnN
{ \cP\#0 }
{ #1 }
\l_@@_renderer_definition_tl
\l_tmpa_tl
\bool_if:NT
\g_@@_appending_renderer_bool
{
\prop_get:NnNTF
\g_@@_renderer_definitions_prop
{ #1 }
\l_tmpa_tl
\tl_if_exist:cTF
{ l_@@_renderers_ #1 }
{
\tl_put_left:NV
\l_@@_renderer_definition_tl
\tl_put_left:Nv
\l_tmpa_tl
{ l_@@_renderers_ #1 }
}
{
\msg_error:nnn
Expand All @@ -20196,15 +20190,14 @@ following text:
{ #1 }
}
}
\prop_put:NnV
\g_@@_renderer_definitions_prop
{ #1 }
\l_@@_renderer_definition_tl
\tl_set:cV
{ l_@@_renderers_ #1 }
\l_tmpa_tl
\cs_generate_from_arg_count:NNnV
#2
\cs_set:Npn
{ #3 }
\l_@@_renderer_definition_tl
\l_tmpa_tl
},
}
}
Expand Down Expand Up @@ -20847,10 +20840,6 @@ following text:
Prototype
}
}
\tl_new:N
\l_@@_renderer_prototype_definition_tl
\prop_new:N
\g_@@_renderer_prototype_definitions_prop
\bool_new:N
\g_@@_appending_renderer_prototype_bool
\cs_new:Nn \@@_define_renderer_prototype:nNn
Expand All @@ -20860,23 +20849,21 @@ following text:
{
#1 .code:n = {
\tl_set:Nn
\l_@@_renderer_prototype_definition_tl
\l_tmpa_tl
{ ##1 }
\regex_replace_all:nnN
{ \cP\#0 }
{ #1 }
\l_@@_renderer_prototype_definition_tl
\l_tmpa_tl
\bool_if:NT
\g_@@_appending_renderer_prototype_bool
{
\prop_get:NnNTF
\g_@@_renderer_prototype_definitions_prop
{ #1 }
\l_tmpa_tl
\tl_if_exist:cTF
{ l_@@_renderer_prototypes_ #1 }
{
\tl_put_left:NV
\l_@@_renderer_prototype_definition_tl
\tl_put_left:Nv
\l_tmpa_tl
{ l_@@_renderer_prototypes_ #1 }
}
{
\msg_error:nnn
Expand All @@ -20885,15 +20872,14 @@ following text:
{ #1 }
}
}
\prop_put:NnV
\g_@@_renderer_prototype_definitions_prop
{ #1 }
\l_@@_renderer_prototype_definition_tl
\tl_set:cV
{ l_@@_renderer_prototypes_ #1 }
\l_tmpa_tl
\cs_generate_from_arg_count:NNnV
#2
\cs_set:Npn
{ #3 }
\l_@@_renderer_prototype_definition_tl
\l_tmpa_tl
},
}
% \end{macrocode}
Expand Down

0 comments on commit cb15454

Please sign in to comment.