diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/generic/markdown/CHANGES.md | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/markdown/VERSION | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/markdown/markdown.html | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/markdown/markdown.pdf | bin | 868025 -> 869480 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/markdown/markdown-cli.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/markdown/markdown.dtx | 118 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/markdown/markdown.tex | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/markdown/markdown.sty | 96 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/markdown/markdown.lua | 2 |
9 files changed, 154 insertions, 98 deletions
diff --git a/Master/texmf-dist/doc/generic/markdown/CHANGES.md b/Master/texmf-dist/doc/generic/markdown/CHANGES.md index e4099613012..e36d6b2e834 100644 --- a/Master/texmf-dist/doc/generic/markdown/CHANGES.md +++ b/Master/texmf-dist/doc/generic/markdown/CHANGES.md @@ -1,11 +1,23 @@ # Changes +## 2.16.1 (2022-08-30) + +Fixes: + +- Fix default rendering of fancy lists in LaTeX. (#179, #180) +- Change category code of hash sign (`#`) to other in the + `\markdownInput` command. (#181) + +Continuous Integration: + +- Use all available CPU cores for unit tests. (#178) + ## 2.16.0 (2022-08-26) Development: -- Add support for strike-throughs, fenced divs, inline spans, subscripts, - superscripts, and fancy lists. (#149, #160, #162, #168, #170) +- Add support for strike-throughs, fenced divs, subscripts, superscripts, + and fancy lists. (#149, #160, #162, #168, #170) - Add facade in front of expl3 inferface for YAML metadata. (#118, #175) - Add `\setupmarkdown` and `\inputmarkdown` commands to ConTeXt. (#17, #176) diff --git a/Master/texmf-dist/doc/generic/markdown/VERSION b/Master/texmf-dist/doc/generic/markdown/VERSION index 4bcc5751533..b46b43bebb8 100644 --- a/Master/texmf-dist/doc/generic/markdown/VERSION +++ b/Master/texmf-dist/doc/generic/markdown/VERSION @@ -1 +1 @@ -2.16.0-5-g5bb83fb (2022/08/26) +2.16.1-0-gf8a4bea (2022-08-30) diff --git a/Master/texmf-dist/doc/generic/markdown/markdown.html b/Master/texmf-dist/doc/generic/markdown/markdown.html index 45ad20384f3..a16e9678184 100644 --- a/Master/texmf-dist/doc/generic/markdown/markdown.html +++ b/Master/texmf-dist/doc/generic/markdown/markdown.html @@ -82,7 +82,7 @@ <header id="title-block-header"> <h1 class="title">Markdown Package User Manual</h1> <p class="author">Vít Novotný</p> -<p class="date">2.16.0-5-g5bb83fb (2022/08/26)</p> +<p class="date">2.16.1-0-gf8a4bea 2022-08-30</p> </header> <nav id="TOC" role="doc-toc"> <ul> diff --git a/Master/texmf-dist/doc/generic/markdown/markdown.pdf b/Master/texmf-dist/doc/generic/markdown/markdown.pdf Binary files differindex 27ef88dc13f..16469cf1fab 100644 --- a/Master/texmf-dist/doc/generic/markdown/markdown.pdf +++ b/Master/texmf-dist/doc/generic/markdown/markdown.pdf diff --git a/Master/texmf-dist/scripts/markdown/markdown-cli.lua b/Master/texmf-dist/scripts/markdown/markdown-cli.lua index 54f6e01b28a..b02228fe790 100644 --- a/Master/texmf-dist/scripts/markdown/markdown-cli.lua +++ b/Master/texmf-dist/scripts/markdown/markdown-cli.lua @@ -58,7 +58,7 @@ -- those in the standard .ins files. -- local metadata = { - version = "2.16.0-5-g5bb83fb", + version = "2.16.1-0-gf8a4bea", comment = "A module for the conversion from markdown to plain TeX", author = "John MacFarlane, Hans Hagen, Vít Novotný", copyright = {"2009-2016 John MacFarlane, Hans Hagen", diff --git a/Master/texmf-dist/source/generic/markdown/markdown.dtx b/Master/texmf-dist/source/generic/markdown/markdown.dtx index ec13dced2c9..4db4ecfcc3c 100644 --- a/Master/texmf-dist/source/generic/markdown/markdown.dtx +++ b/Master/texmf-dist/source/generic/markdown/markdown.dtx @@ -859,7 +859,7 @@ abbr { --- title: Markdown Package User Manual author: Vít Novotný -date: \markdownVersion{} (\markdownLastModified{}) +date: \markdownVersion{} \markdownLastModified{} --- <link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet" /> @@ -23963,11 +23963,13 @@ end % \end{macrocode} % \begin{markdown} % Swap the category code of the backslash symbol and the pipe symbol, so that -% we may use the backslash symbol freely inside the Lua code. +% we may use the backslash symbol freely inside the Lua code. Furthermore, +% use the ampersand symbol to specify parameters. % \end{markdown} % \begin{macrocode} \catcode`|=0% \catcode`\\=12% + \catcode`|&=6% |gdef|markdownInput#1{% % \end{macrocode} % \begin{markdown} @@ -23980,6 +23982,14 @@ end |catcode`|%=12 % \end{macrocode} % \begin{markdown} +% Furthermore, also change the category code of the hash sign (`#`) to other, +% so that it's safe to tokenize the plain TeX output without mistaking hash +% signs with TeX's parameter numbers. +% \end{markdown} +% \begin{macrocode} + |catcode`|#=12 +% \end{macrocode} +% \begin{markdown} % If we are reading from the frozen cache, input it, expand the corresponding % `\markdownFrozenCache`\meta{number} macro, and increment % \Opt{frozenCacheCounter}. @@ -23996,7 +24006,7 @@ end |csname markdownFrozenCache|the|markdownOptionFrozenCacheCounter|endcsname |global|advance|markdownOptionFrozenCacheCounter by 1|relax }{% - |markdownInfo{Including markdown document "#1"}% + |markdownInfo{Including markdown document "&1"}% % \end{macrocode} % \begin{markdown} % Attempt to open the markdown document to record it in the `.log` and @@ -24004,13 +24014,13 @@ end % changes to the markdown document. % \end{markdown} % \begin{macrocode} - |openin|markdownInputFileStream#1 + |openin|markdownInputFileStream&1 |closein|markdownInputFileStream |markdownPrepareLuaOptions |markdownLuaExecute{% |markdownPrepare - local file = assert(io.open("#1", "r"), - [[could not open file "#1" for reading]]) + local file = assert(io.open("&1", "r"), + [[could not open file "&1" for reading]]) local input = assert(file:read("*a")) assert(file:close()) % \end{macrocode} @@ -24542,17 +24552,17 @@ end { { Default } { . } { OneParen } { ) } - { Period } { - } + { Period } { . } } } \cs_new:Nn \@@_latex_fancy_list_item_label:nnn { - \@@_latex_fancy_list_item_label_delimiter:n - { #2 } \@@_latex_fancy_list_item_label_number:nn { #1 } { #3 } + \@@_latex_fancy_list_item_label_delimiter:n + { #2 } } \cs_new:Nn \@@_latex_paralist_style:nn @@ -24580,7 +24590,16 @@ end \tl_set:Nn \l_@@_latex_fancy_list_item_label_delimiter_style_tl { #2 } - \begin{enumerate}[ \@@_latex_paralist_style:nn { #1 } { #2 } ] + \tl_set:Nn + \l_tmpa_tl + { \begin{enumerate}[ } + \tl_put_right:Nx + \l_tmpa_tl + { \@@_latex_paralist_style:nn { #1 } { #2 } } + \tl_put_right:Nn + \l_tmpa_tl + { ] } + \l_tmpa_tl }, fancyOlEnd = { \end{enumerate} @@ -24596,20 +24615,29 @@ end \tl_set:Nn \l_@@_latex_fancy_list_item_label_delimiter_style_tl { #2 } - \begin{compactenum}[ \@@_latex_paralist_style:nn { #1 } { #2 } ] + \tl_set:Nn + \l_tmpa_tl + { \begin{compactenum}[ } + \tl_put_right:Nx + \l_tmpa_tl + { \@@_latex_paralist_style:nn { #1 } { #2 } } + \tl_put_right:Nn + \l_tmpa_tl + { ] } + \l_tmpa_tl }, fancyOlEndTight = { \end{compactenum} \group_end: }, fancyOlItemWithNumber = { - \markdownRendererOlItemWithNumber - { + \item + [ \@@_latex_fancy_list_item_label:VVn \l_@@_latex_fancy_list_item_label_number_style_tl \l_@@_latex_fancy_list_item_label_delimiter_style_tl { #1 } - } + ] }, dlBeginTight = {\begin{compactdesc}}, dlEndTight = {\end{compactdesc}}}} @@ -24701,8 +24729,10 @@ end }{% \ifthenelse{\equal{#1}{tex}}{% \catcode`\%=14\relax + \catcode`\#=6\relax \input #3\relax \catcode`\%=12\relax + \catcode`\#=12\relax }{% \markdownInput{#3}% }% @@ -24793,7 +24823,9 @@ end % \end{markdown} % \begin{macrocode} }{% + \catcode`\#=6\relax \inputminted{#2}{#1}% + \catcode`\#=12\relax }% \fi}, horizontalRule = {\noindent\rule[0.5ex]{\linewidth}{1pt}}, @@ -25156,11 +25188,23 @@ end \RequirePackage{url} \RequirePackage{expl3} \ExplSyntaxOn -\def\markdownRendererLinkPrototype{ - \begingroup - \catcode`\#=12 - \def\next##1##2##3##4{ - \endgroup +\def\markdownRendererLinkPrototype#1#2#3#4{ + \tl_set:Nn \l_tmpa_tl { #1 } + \tl_set:Nn \l_tmpb_tl { #2 } + \bool_set:Nn + \l_tmpa_bool + { + \tl_if_eq_p:NN + \l_tmpa_tl + \l_tmpb_tl + } + \tl_set:Nn \l_tmpa_tl { #4 } + \bool_set:Nn + \l_tmpb_bool + { + \tl_if_empty_p:N + \l_tmpa_tl + } % \end{macrocode} % \begin{markdown} % If the label and the fully-escaped URI are equivalent and the title is @@ -25168,33 +25212,15 @@ end % link is either direct or indirect. % \end{markdown} % \begin{macrocode} - \tl_set:Nn \l_tmpa_tl { ##1 } - \tl_set:Nn \l_tmpb_tl { ##2 } - \bool_set:Nn - \l_tmpa_bool - { - \tl_if_eq_p:NN - \l_tmpa_tl - \l_tmpb_tl - } - \tl_set:Nn \l_tmpa_tl { ##4 } - \bool_set:Nn - \l_tmpb_bool - { - \tl_if_empty_p:N - \l_tmpa_tl - } - \bool_if:nTF - { - \l_tmpa_bool && \l_tmpb_bool - } - { - \markdownLaTeXRendererAutolink { ##2 } { ##3 } - }{ - \markdownLaTeXRendererDirectOrIndirectLink { ##1 } { ##2 } { ##3 } { ##4 } - } - } - \next + \bool_if:nTF + { + \l_tmpa_bool && \l_tmpb_bool + } + { + \markdownLaTeXRendererAutolink { #2 } { #3 } + }{ + \markdownLaTeXRendererDirectOrIndirectLink { #1 } { #2 } { #3 } { #4 } + } } \def\markdownLaTeXRendererAutolink#1#2{% % \end{macrocode} diff --git a/Master/texmf-dist/tex/generic/markdown/markdown.tex b/Master/texmf-dist/tex/generic/markdown/markdown.tex index 2bf3439aabb..d78e8fcdfaa 100644 --- a/Master/texmf-dist/tex/generic/markdown/markdown.tex +++ b/Master/texmf-dist/tex/generic/markdown/markdown.tex @@ -440,8 +440,8 @@ { boolean } { true } \ExplSyntaxOff -\def\markdownLastModified{2022/08/26}% -\def\markdownVersion{2.16.0-5-g5bb83fb}% +\def\markdownLastModified{2022-08-30}% +\def\markdownVersion{2.16.1-0-gf8a4bea}% \let\markdownBegin\relax \let\markdownEnd\relax \let\markdownInput\relax @@ -2198,9 +2198,11 @@ \begingroup \catcode`|=0% \catcode`\\=12% + \catcode`|&=6% |gdef|markdownInput#1{% |begingroup |catcode`|%=12 + |catcode`|#=12 |markdownIfOption{frozenCache}{% |ifnum|markdownOptionFrozenCacheCounter=0|relax |markdownInfo{Reading frozen cache from @@ -2212,14 +2214,14 @@ |csname markdownFrozenCache|the|markdownOptionFrozenCacheCounter|endcsname |global|advance|markdownOptionFrozenCacheCounter by 1|relax }{% - |markdownInfo{Including markdown document "#1"}% - |openin|markdownInputFileStream#1 + |markdownInfo{Including markdown document "&1"}% + |openin|markdownInputFileStream&1 |closein|markdownInputFileStream |markdownPrepareLuaOptions |markdownLuaExecute{% |markdownPrepare - local file = assert(io.open("#1", "r"), - [[could not open file "#1" for reading]]) + local file = assert(io.open("&1", "r"), + [[could not open file "&1" for reading]]) local input = assert(file:read("*a")) assert(file:close()) print(convert(input:gsub("\r\n?", "\n") .. "\n"))}% diff --git a/Master/texmf-dist/tex/latex/markdown/markdown.sty b/Master/texmf-dist/tex/latex/markdown/markdown.sty index 6f7c8cdbebf..19898298d26 100644 --- a/Master/texmf-dist/tex/latex/markdown/markdown.sty +++ b/Master/texmf-dist/tex/latex/markdown/markdown.sty @@ -426,17 +426,17 @@ { { Default } { . } { OneParen } { ) } - { Period } { - } + { Period } { . } } } \cs_new:Nn \__markdown_latex_fancy_list_item_label:nnn { - \__markdown_latex_fancy_list_item_label_delimiter:n - { #2 } \__markdown_latex_fancy_list_item_label_number:nn { #1 } { #3 } + \__markdown_latex_fancy_list_item_label_delimiter:n + { #2 } } \cs_new:Nn \__markdown_latex_paralist_style:nn @@ -464,7 +464,16 @@ \tl_set:Nn \l__markdown_latex_fancy_list_item_label_delimiter_style_tl { #2 } - \begin{enumerate}[ \__markdown_latex_paralist_style:nn { #1 } { #2 } ] + \tl_set:Nn + \l_tmpa_tl + { \begin{enumerate}[ } + \tl_put_right:Nx + \l_tmpa_tl + { \__markdown_latex_paralist_style:nn { #1 } { #2 } } + \tl_put_right:Nn + \l_tmpa_tl + { ] } + \l_tmpa_tl }, fancyOlEnd = { \end{enumerate} @@ -480,20 +489,29 @@ \tl_set:Nn \l__markdown_latex_fancy_list_item_label_delimiter_style_tl { #2 } - \begin{compactenum}[ \__markdown_latex_paralist_style:nn { #1 } { #2 } ] + \tl_set:Nn + \l_tmpa_tl + { \begin{compactenum}[ } + \tl_put_right:Nx + \l_tmpa_tl + { \__markdown_latex_paralist_style:nn { #1 } { #2 } } + \tl_put_right:Nn + \l_tmpa_tl + { ] } + \l_tmpa_tl }, fancyOlEndTight = { \end{compactenum} \group_end: }, fancyOlItemWithNumber = { - \markdownRendererOlItemWithNumber - { + \item + [ \__markdown_latex_fancy_list_item_label:VVn \l__markdown_latex_fancy_list_item_label_number_style_tl \l__markdown_latex_fancy_list_item_label_delimiter_style_tl { #1 } - } + ] }, dlBeginTight = {\begin{compactdesc}}, dlEndTight = {\end{compactdesc}}}} @@ -558,8 +576,10 @@ }{% \ifthenelse{\equal{#1}{tex}}{% \catcode`\%=14\relax + \catcode`\#=6\relax \input #3\relax \catcode`\%=12\relax + \catcode`\#=12\relax }{% \markdownInput{#3}% }% @@ -624,7 +644,9 @@ \lstinputlisting[language=#2]{#1}% }% }{% + \catcode`\#=6\relax \inputminted{#2}{#1}% + \catcode`\#=12\relax }% \fi}, horizontalRule = {\noindent\rule[0.5ex]{\linewidth}{1pt}}, @@ -923,38 +945,32 @@ \RequirePackage{url} \RequirePackage{expl3} \ExplSyntaxOn -\def\markdownRendererLinkPrototype{ - \begingroup - \catcode`\#=12 - \def\next##1##2##3##4{ - \endgroup - \tl_set:Nn \l_tmpa_tl { ##1 } - \tl_set:Nn \l_tmpb_tl { ##2 } - \bool_set:Nn - \l_tmpa_bool - { - \tl_if_eq_p:NN - \l_tmpa_tl - \l_tmpb_tl - } - \tl_set:Nn \l_tmpa_tl { ##4 } - \bool_set:Nn - \l_tmpb_bool - { - \tl_if_empty_p:N - \l_tmpa_tl - } - \bool_if:nTF - { - \l_tmpa_bool && \l_tmpb_bool - } - { - \markdownLaTeXRendererAutolink { ##2 } { ##3 } - }{ - \markdownLaTeXRendererDirectOrIndirectLink { ##1 } { ##2 } { ##3 } { ##4 } - } - } - \next +\def\markdownRendererLinkPrototype#1#2#3#4{ + \tl_set:Nn \l_tmpa_tl { #1 } + \tl_set:Nn \l_tmpb_tl { #2 } + \bool_set:Nn + \l_tmpa_bool + { + \tl_if_eq_p:NN + \l_tmpa_tl + \l_tmpb_tl + } + \tl_set:Nn \l_tmpa_tl { #4 } + \bool_set:Nn + \l_tmpb_bool + { + \tl_if_empty_p:N + \l_tmpa_tl + } + \bool_if:nTF + { + \l_tmpa_bool && \l_tmpb_bool + } + { + \markdownLaTeXRendererAutolink { #2 } { #3 } + }{ + \markdownLaTeXRendererDirectOrIndirectLink { #1 } { #2 } { #3 } { #4 } + } } \def\markdownLaTeXRendererAutolink#1#2{% \tl_set:Nn diff --git a/Master/texmf-dist/tex/luatex/markdown/markdown.lua b/Master/texmf-dist/tex/luatex/markdown/markdown.lua index 091e7052bb9..79b875ea469 100644 --- a/Master/texmf-dist/tex/luatex/markdown/markdown.lua +++ b/Master/texmf-dist/tex/luatex/markdown/markdown.lua @@ -58,7 +58,7 @@ -- those in the standard .ins files. -- local metadata = { - version = "2.16.0-5-g5bb83fb", + version = "2.16.1-0-gf8a4bea", comment = "A module for the conversion from markdown to plain TeX", author = "John MacFarlane, Hans Hagen, Vít Novotný", copyright = {"2009-2016 John MacFarlane, Hans Hagen", |