diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/third/markdown')
-rw-r--r-- | Master/texmf-dist/tex/context/third/markdown/t-markdown.tex | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex b/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex index 2585f0c2f69..79ba3273a63 100644 --- a/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex +++ b/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex @@ -76,13 +76,29 @@ \seq_map_inline:cn { g__markdown_ ##1 _options_seq } { - \__markdown_context_define_option_keyval:nn - { ##1 } + \__markdown_with_various_cases:nn { ####1 } + { + \__markdown_context_define_option_keyval:nnn + { ##1 } + { ####1 } + { ########1 } + } } } } -\cs_new:Nn \__markdown_context_define_option_keyval:nn +\cs_new:Nn \__markdown_caseless:N + { + \regex_replace_all:nnN + { ([a-z])([A-Z]) } + { \1 \c { str_lowercase:n } \cB\{ \2 \cE\} } + #1 + \tl_set:Nx + #1 + { #1 } + } +\seq_gput_right:Nn \g__markdown_cases_seq { __markdown_caseless:N } +\cs_new:Nn \__markdown_context_define_option_keyval:nnn { \prop_get:cnN { g__markdown_ #1 _option_types_prop } @@ -91,7 +107,7 @@ \keys_define:nn { markdown/context-options } { - #2 .code:n = { + #3 .code:n = { \tl_set:Nx \l_tmpa_tl { @@ -115,7 +131,7 @@ \keys_define:nn { markdown/context-options } { - #2 .default:n = { true }, + #3 .default:n = { true }, } } } @@ -258,9 +274,9 @@ \def\markdownRendererHeadingFourPrototype#1{\subsubsection{#1}}% \def\markdownRendererHeadingFivePrototype#1{\subsubsubsection{#1}}% \def\markdownRendererHeadingSixPrototype#1{\subsubsubsubsection{#1}}% -\def\markdownRendererHorizontalRulePrototype{% +\def\markdownRendererThematicBreakPrototype{% \blackrule[height=1pt, width=\hsize]}% -\def\markdownRendererFootnotePrototype#1{\footnote{#1}}% +\def\markdownRendererNotePrototype#1{\footnote{#1}}% \def\markdownRendererTickedBoxPrototype{$\boxtimes$} \def\markdownRendererHalfTickedBoxPrototype{$\boxdot$} \def\markdownRendererUntickedBoxPrototype{$\square$} @@ -332,6 +348,22 @@ \ifnum\markdownConTeXtColumnCounter<\markdownConTeXtColumnTotal\relax\else \expandafter\gobbleoneargument \fi\markdownConTeXtRenderTableCell} +\ExplSyntaxOn +\cs_gset:Npn + \markdownRendererInputRawInlinePrototype#1#2 + { + \str_case:nn + { #2 } + { + { tex } { \markdownEscape{#1} } + { context } { \markdownEscape{#1} } + { md } { \markdownInput{#1} } + } + } +\cs_gset_eq:NN + \markdownRendererInputRawBlockPrototype + \markdownRendererInputRawInlinePrototype +\ExplSyntaxOff \stopmodule\protect \endinput %% |