From f73d138cf7df8989e3e97d47731a4ca4754fd399 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 29 Apr 2017 22:23:07 +0000
Subject: markdown (29apr17)

git-svn-id: svn://tug.org/texlive/trunk@44118 c570f23f-e606-0410-a88d-b1316a301751
---
 .../source/generic/markdown/markdown.dtx           | 24 ++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

(limited to 'Master/texmf-dist/source/generic/markdown/markdown.dtx')

diff --git a/Master/texmf-dist/source/generic/markdown/markdown.dtx b/Master/texmf-dist/source/generic/markdown/markdown.dtx
index 876a9e27dfe..b836b44ef38 100644
--- a/Master/texmf-dist/source/generic/markdown/markdown.dtx
+++ b/Master/texmf-dist/source/generic/markdown/markdown.dtx
@@ -156,7 +156,7 @@
 % \fi
 %  \begin{macrocode}
 local metadata = {
-    version   = "2.5.1",
+    version   = "2.5.2",
     comment   = "A module for the conversion from markdown to plain TeX",
     author    = "John MacFarlane, Hans Hagen, Vít Novotný",
     copyright = "2009-2017 John MacFarlane, Hans Hagen; " ..
@@ -719,8 +719,8 @@ defaultOptions.underscores = true
 % \ref{sec:luaoptions}) used during the conversion from markdown to plain
 % \TeX{}, and for changing the way markdown the tokens are rendered.
 %  \begin{macrocode}
-\def\markdownLastModified{2017/04/27}%
-\def\markdownVersion{2.5.1}%
+\def\markdownLastModified{2017/04/28}%
+\def\markdownVersion{2.5.2}%
 %    \end{macrocode}
 %
 % The plain \TeX{} interface is implemented by the \t`markdown.tex` file that
@@ -3039,7 +3039,9 @@ parsers.letter                 = R("AZ","az")
 parsers.alphanumeric           = R("AZ","az","09")
 parsers.keyword                = parsers.letter
                                * parsers.alphanumeric^0
-parsers.internal_punctuation   = S(":;,.#$%&-+?<>~/_")
+parsers.citation_chars         = parsers.alphanumeric
+                               + S("#$%&-+<>~/_")
+parsers.internal_punctuation   = S(":;,.?")
 
 parsers.doubleasterisks        = P("**")
 parsers.doubleunderscores      = P("__")
@@ -3311,9 +3313,14 @@ parsers.localfilepath
 % \paragraph{Parsers Used for Citations}
 %  \begin{macrocode}
 parsers.citation_name = Cs(parsers.dash^-1) * parsers.at
-                      * Cs(parsers.alphanumeric
-                          * (parsers.alphanumeric + parsers.internal_punctuation
-                            - parsers.comma - parsers.semicolon)^0)
+                      * Cs(parsers.citation_chars
+                          * (((parsers.citation_chars + parsers.internal_punctuation
+                              - parsers.comma - parsers.semicolon)
+                             * -#((parsers.internal_punctuation - parsers.comma
+                                  - parsers.semicolon)^0
+                                 * -(parsers.citation_chars + parsers.internal_punctuation
+                                    - parsers.comma - parsers.semicolon)))^0
+                            * parsers.citation_chars)^-1)
 
 parsers.citation_body_prenote
                     = Cs((parsers.alphanumeric^1
@@ -3335,7 +3342,8 @@ parsers.citation_body_postnote
 parsers.citation_body_chunk
                     = parsers.citation_body_prenote
                     * parsers.spnl * parsers.citation_name
-                    * (parsers.comma * parsers.spnl)^-1
+                    * ((parsers.internal_punctuation - parsers.semicolon)
+                      * parsers.spnl)^-1
                     * parsers.citation_body_postnote
 
 parsers.citation_body
-- 
cgit v1.2.3

