Skip to content

Commit

Permalink
Show error when a wildcard does not match any renderer (prototype)
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Apr 6, 2023
1 parent b863821 commit dd9b425
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -20015,6 +20015,8 @@ variant of the `import` \LaTeX{} option:
\regex_set:NV
\l_tmpa_regex
\l_tmpa_tl
\int_zero:N
\l_tmpa_int
\seq_map_inline:Nn
\g_@@_renderers_seq
{
Expand All @@ -20037,10 +20039,20 @@ variant of the `import` \LaTeX{} option:
\cs_set:Npn
\l_tmpb_tl
\l_@@_renderer_prototype_definition_tl
\int_incr:N
\l_tmpa_int
\@@_with_various_cases_break:
}
}
}
\int_compare:nNnT
{ \l_tmpa_int } = { 0 }
{
\msg_error:nnV
{ markdown }
{ nonmatched-renderer-wildcard }
\l_keys_key_str
}
}
{
\msg_error:nnV
Expand All @@ -20056,6 +20068,12 @@ variant of the `import` \LaTeX{} option:
{
Renderer~#1~is~undefined.
}
\msg_new:nnn
{ markdown }
{ nonmatched-renderer-wildcard }
{
Wildcard~#1~matches~no~renderers.
}
\cs_generate_variant:Nn
\regex_set:Nn
{ NV }
Expand Down Expand Up @@ -20172,6 +20190,8 @@ variant of the `import` \LaTeX{} option:
\regex_set:NV
\l_tmpa_regex
\l_tmpa_tl
\int_zero:N
\l_tmpa_int
\seq_map_inline:Nn
\g_@@_renderers_seq
{
Expand All @@ -20194,10 +20214,20 @@ variant of the `import` \LaTeX{} option:
\cs_set:Npn
\l_tmpb_tl
\l_@@_renderer_prototype_definition_tl
\int_incr:N
\l_tmpa_int
\@@_with_various_cases_break:
}
}
}
\int_compare:nNnT
{ \l_tmpa_int } = { 0 }
{
\msg_error:nnV
{ markdown }
{ nonmatched-renderer-prototype-wildcard }
\l_keys_key_str
}
}
{
\msg_error:nnV
Expand All @@ -20213,6 +20243,12 @@ variant of the `import` \LaTeX{} option:
{
Renderer~prototype~#1~is~undefined.
}
\msg_new:nnn
{ markdown }
{ nonmatched-renderer-prototype-wildcard }
{
Wildcard~#1~matches~no~renderer~prototypes.
}
\cs_generate_variant:Nn
\regex_set:Nn
{ NV }
Expand Down

0 comments on commit dd9b425

Please sign in to comment.