diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/markdown')
-rw-r--r-- | Master/texmf-dist/tex/generic/markdown/markdown.tex | 79 |
1 files changed, 58 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/generic/markdown/markdown.tex b/Master/texmf-dist/tex/generic/markdown/markdown.tex index d78e8fcdfaa..d0625257290 100644 --- a/Master/texmf-dist/tex/generic/markdown/markdown.tex +++ b/Master/texmf-dist/tex/generic/markdown/markdown.tex @@ -129,6 +129,8 @@ \msg_error:nnnn { nnnV } \seq_new:N \g__markdown_option_types_seq +\tl_const:Nn \c__markdown_option_type_clist_tl { clist } +\seq_put_right:NV \g__markdown_option_types_seq \c__markdown_option_type_clist_tl \tl_const:Nn \c__markdown_option_type_counter_tl { counter } \seq_put_right:NV \g__markdown_option_types_seq \c__markdown_option_type_counter_tl \tl_const:Nn \c__markdown_option_type_boolean_tl { boolean } @@ -323,6 +325,13 @@ { eagerCache } { boolean } { true } +\cs_generate_variant:Nn + \__markdown_add_lua_option:nnn + { nnV } +\__markdown_add_lua_option:nnV + { extensions } + { clist } + \c_empty_clist \__markdown_add_lua_option:nnn { expectJekyllData } { boolean } @@ -440,8 +449,8 @@ { boolean } { true } \ExplSyntaxOff -\def\markdownLastModified{2022-08-30}% -\def\markdownVersion{2.16.1-0-gf8a4bea}% +\def\markdownLastModified{2022-09-30}% +\def\markdownVersion{2.17.0-0-g6428569}% \let\markdownBegin\relax \let\markdownEnd\relax \let\markdownInput\relax @@ -1945,25 +1954,50 @@ \__markdown_get_option_type:nN { #1 } \l_tmpa_tl - \bool_if:nTF - { - \str_if_eq_p:VV - \l_tmpa_tl - \c__markdown_option_type_boolean_tl || - \str_if_eq_p:VV - \l_tmpa_tl - \c__markdown_option_type_number_tl || - \str_if_eq_p:VV - \l_tmpa_tl - \c__markdown_option_type_counter_tl - } + \bool_case_true:nF { - \__markdown_get_option_value:nN - { #1 } - \l_tmpa_tl - \tl_gput_right:Nx - \g__markdown_formatted_lua_options_tl - { #1~=~ \l_tmpa_tl ,~ } + { + \str_if_eq_p:VV + \l_tmpa_tl + \c__markdown_option_type_boolean_tl || + \str_if_eq_p:VV + \l_tmpa_tl + \c__markdown_option_type_number_tl || + \str_if_eq_p:VV + \l_tmpa_tl + \c__markdown_option_type_counter_tl + } + { + \__markdown_get_option_value:nN + { #1 } + \l_tmpa_tl + \tl_gput_right:Nx + \g__markdown_formatted_lua_options_tl + { #1~=~ \l_tmpa_tl ,~ } + } + { + \str_if_eq_p:VV + \l_tmpa_tl + \c__markdown_option_type_clist_tl + } + { + \__markdown_get_option_value:nN + { #1 } + \l_tmpa_tl + \tl_gput_right:Nx + \g__markdown_formatted_lua_options_tl + { #1~=~\c_left_brace_str } + \clist_map_inline:Vn + \l_tmpa_tl + { + \tl_gput_right:Nx + \g__markdown_formatted_lua_options_tl + { "##1" ,~ } + } + \tl_gput_right:Nx + \g__markdown_formatted_lua_options_tl + { \c_right_brace_str ,~ } + } } { \__markdown_get_option_value:nN @@ -1974,6 +2008,9 @@ { #1~=~ " \l_tmpa_tl " ,~ } } } +\cs_generate_variant:Nn + \clist_map_inline:nn + { Vn } \let\markdownPrepareLuaOptions=\__markdown_format_lua_options: \def\markdownLuaOptions{{ \g__markdown_formatted_lua_options_tl }} \ExplSyntaxOff @@ -2221,7 +2258,7 @@ |markdownLuaExecute{% |markdownPrepare local file = assert(io.open("&1", "r"), - [[could not open file "&1" for reading]]) + [[Could not open file "&1" for reading]]) local input = assert(file:read("*a")) assert(file:close()) print(convert(input:gsub("\r\n?", "\n") .. "\n"))}% |