texlive[64240] Master/texmf-dist: markdown (30aug22)

commits+karl at tug.org commits+karl at tug.org
Tue Aug 30 21:51:52 CEST 2022


Revision: 64240
          http://tug.org/svn/texlive?view=revision&revision=64240
Author:   karl
Date:     2022-08-30 21:51:52 +0200 (Tue, 30 Aug 2022)
Log Message:
-----------
markdown (30aug22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/markdown/CHANGES.md
    trunk/Master/texmf-dist/doc/generic/markdown/VERSION
    trunk/Master/texmf-dist/doc/generic/markdown/markdown.html
    trunk/Master/texmf-dist/doc/generic/markdown/markdown.pdf
    trunk/Master/texmf-dist/scripts/markdown/markdown-cli.lua
    trunk/Master/texmf-dist/source/generic/markdown/markdown.dtx
    trunk/Master/texmf-dist/tex/generic/markdown/markdown.tex
    trunk/Master/texmf-dist/tex/latex/markdown/markdown.sty
    trunk/Master/texmf-dist/tex/luatex/markdown/markdown.lua

Modified: trunk/Master/texmf-dist/doc/generic/markdown/CHANGES.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/markdown/CHANGES.md	2022-08-30 19:51:35 UTC (rev 64239)
+++ trunk/Master/texmf-dist/doc/generic/markdown/CHANGES.md	2022-08-30 19:51:52 UTC (rev 64240)
@@ -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)
 

Modified: trunk/Master/texmf-dist/doc/generic/markdown/VERSION
===================================================================
--- trunk/Master/texmf-dist/doc/generic/markdown/VERSION	2022-08-30 19:51:35 UTC (rev 64239)
+++ trunk/Master/texmf-dist/doc/generic/markdown/VERSION	2022-08-30 19:51:52 UTC (rev 64240)
@@ -1 +1 @@
-2.16.0-5-g5bb83fb (2022/08/26)
+2.16.1-0-gf8a4bea (2022-08-30)

Modified: trunk/Master/texmf-dist/doc/generic/markdown/markdown.html
===================================================================
--- trunk/Master/texmf-dist/doc/generic/markdown/markdown.html	2022-08-30 19:51:35 UTC (rev 64239)
+++ trunk/Master/texmf-dist/doc/generic/markdown/markdown.html	2022-08-30 19:51:52 UTC (rev 64240)
@@ -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>

Modified: trunk/Master/texmf-dist/doc/generic/markdown/markdown.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/markdown/markdown-cli.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/markdown/markdown-cli.lua	2022-08-30 19:51:35 UTC (rev 64239)
+++ trunk/Master/texmf-dist/scripts/markdown/markdown-cli.lua	2022-08-30 19:51:52 UTC (rev 64240)
@@ -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",

Modified: trunk/Master/texmf-dist/source/generic/markdown/markdown.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/markdown/markdown.dtx	2022-08-30 19:51:35 UTC (rev 64239)
+++ trunk/Master/texmf-dist/source/generic/markdown/markdown.dtx	2022-08-30 19:51:52 UTC (rev 64240)
@@ -859,7 +859,7 @@
 ---
 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{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 @@
     |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 @@
       |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 @@
 % 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 @@
         {
           { 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 @@
       \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,7 +24615,16 @@
       \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}
@@ -24603,13 +24631,13 @@
       \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 @@
     }{%
       \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{markdown}
 %  \begin{macrocode}
       }{%
+        \catcode`\#=6\relax
         \inputminted{#2}{#1}%
+        \catcode`\#=12\relax
       }%
     \fi},
   horizontalRule = {\noindent\rule[0.5ex]{\linewidth}{1pt}},
@@ -25156,11 +25188,23 @@
 \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 @@
 % 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}

Modified: trunk/Master/texmf-dist/tex/generic/markdown/markdown.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/markdown/markdown.tex	2022-08-30 19:51:35 UTC (rev 64239)
+++ trunk/Master/texmf-dist/tex/generic/markdown/markdown.tex	2022-08-30 19:51:52 UTC (rev 64240)
@@ -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"))}%

Modified: trunk/Master/texmf-dist/tex/latex/markdown/markdown.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/markdown/markdown.sty	2022-08-30 19:51:35 UTC (rev 64239)
+++ trunk/Master/texmf-dist/tex/latex/markdown/markdown.sty	2022-08-30 19:51:52 UTC (rev 64240)
@@ -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,7 +489,16 @@
       \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}
@@ -487,13 +505,13 @@
       \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

Modified: trunk/Master/texmf-dist/tex/luatex/markdown/markdown.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/markdown/markdown.lua	2022-08-30 19:51:35 UTC (rev 64239)
+++ trunk/Master/texmf-dist/tex/luatex/markdown/markdown.lua	2022-08-30 19:51:52 UTC (rev 64240)
@@ -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",



More information about the tex-live-commits mailing list.