diff options
author | Karl Berry <karl@freefriends.org> | 2022-01-30 21:14:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-01-30 21:14:20 +0000 |
commit | d88c12c479ddbadc494d4967e6c4777f1afeb537 (patch) | |
tree | 6392333f6f77518cfb8a6b4f71116138225703da /Master/texmf-dist/tex/luatex/markdown/markdown.lua | |
parent | 88ea99da9ff53c27e892b7524db90febe4a28b22 (diff) |
markdown (30jan22)
git-svn-id: svn://tug.org/texlive/trunk@61807 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/markdown/markdown.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/markdown/markdown.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/luatex/markdown/markdown.lua b/Master/texmf-dist/tex/luatex/markdown/markdown.lua index 4241d6cc3b9..aac73da3c9f 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.12.0-1-g976f074", + version = "2.13.0-0-g1f680a8", 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", @@ -2343,7 +2343,6 @@ function M.writer.new(options) if not self.is_writing then return "" end return "\\markdownRendererInterblockSeparator\n{}" end - self.eof = [[\relax]] self.linebreak = "\\markdownRendererLineBreak\n{}" self.ellipsis = "\\markdownRendererEllipsis{}" function self.hrule() @@ -2593,6 +2592,10 @@ function M.writer.new(options) local name = util.cache(options.cacheDir, s, nil, nil, ".verbatim") return {"\\markdownRendererInputFencedCode{",name,"}{",i,"}"} end + function self.document(d) + return {"\\markdownRendererDocumentBegin\n", d, + "\\markdownRendererDocumentEnd"} + end function self.jekyllData(d, t, p) if not self.is_writing then return "" end @@ -3933,7 +3936,7 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline * (P("---") + P("...")) / function(text) local tinyyaml = require("markdown-tinyyaml") - data = tinyyaml.parse(text) + data = tinyyaml.parse(text,{timestamps=false}) return writer.jekyllData(data, function(s) return parse_blocks(s) end, nil) @@ -4317,7 +4320,8 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline local salt = table.concat(opt_string, ",") .. "," .. metadata.version local output local function convert(input) - return util.rope_to_string(parse_blocks_toplevel(input)) .. writer.eof + local document = parse_blocks_toplevel(input) + return util.rope_to_string(writer.document(document)) end if options.eagerCache or options.finalizeCache then local name = util.cache(options.cacheDir, input, salt, convert, ".md" .. writer.suffix) |