aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-04-17 11:54:42 +0200
committerAlbert Krewinkel <albert+github@zeitkraut.de>2017-04-26 23:28:40 +0200
commit24ef67213213b621a6c0f340e7bfdf68d2d40ac1 (patch)
tree982f02fac63ed5ba2b3a7500bdd54fbd848d2ada /test
parentc2567b2bd03f6dadd971cf8bc81cd93a0dde623e (diff)
downloadpandoc-24ef67213213b621a6c0f340e7bfdf68d2d40ac1.tar.gz
Lua module: provide simple `read` format parser
A single `read` function parsing pandoc-supported formats is added to the module. This is simpler and more convenient than the previous method of exposing all reader functions individually.
Diffstat (limited to 'test')
-rw-r--r--test/lua/markdown-reader.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lua/markdown-reader.lua b/test/lua/markdown-reader.lua
index aefba4bdf..1530a15a2 100644
--- a/test/lua/markdown-reader.lua
+++ b/test/lua/markdown-reader.lua
@@ -2,7 +2,8 @@ return {
{
RawBlock = function (elem)
if elem.format == "markdown" then
- return pandoc.reader.markdown.read_block(elem.text)
+ local pd = pandoc.read(elem.text, "markdown")
+ return pd.blocks[1]
else
return elem
end