aboutsummaryrefslogtreecommitdiff
path: root/test/lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/lua')
-rw-r--r--test/lua/markdown-reader.lua8
-rw-r--r--test/lua/plain-to-para.lua4
-rw-r--r--test/lua/single-to-double-quoted.lua5
-rw-r--r--test/lua/strmacro.lua6
4 files changed, 12 insertions, 11 deletions
diff --git a/test/lua/markdown-reader.lua b/test/lua/markdown-reader.lua
index a72af5546..aefba4bdf 100644
--- a/test/lua/markdown-reader.lua
+++ b/test/lua/markdown-reader.lua
@@ -1,10 +1,10 @@
return {
{
- RawBlock = function (format, content)
- if format == "markdown" then
- return pandoc.reader.markdown.read_block(content)
+ RawBlock = function (elem)
+ if elem.format == "markdown" then
+ return pandoc.reader.markdown.read_block(elem.text)
else
- return blk
+ return elem
end
end,
}
diff --git a/test/lua/plain-to-para.lua b/test/lua/plain-to-para.lua
index a11edbbe2..aa12a97d3 100644
--- a/test/lua/plain-to-para.lua
+++ b/test/lua/plain-to-para.lua
@@ -1,6 +1,6 @@
return {
- { Plain = function (content)
- return pandoc.Para(content)
+ { Plain = function (elem)
+ return pandoc.Para(elem.content)
end,
}
}
diff --git a/test/lua/single-to-double-quoted.lua b/test/lua/single-to-double-quoted.lua
index 8a0a5732a..45c184c95 100644
--- a/test/lua/single-to-double-quoted.lua
+++ b/test/lua/single-to-double-quoted.lua
@@ -1,7 +1,8 @@
return {
{
- SingleQuoted = function (content)
- return pandoc.Quoted("DoubleQuote", content)
+ SingleQuoted = function (elem)
+ elem.quotetype = "DoubleQuote"
+ return elem
end,
}
}
diff --git a/test/lua/strmacro.lua b/test/lua/strmacro.lua
index 40756a476..a2711798a 100644
--- a/test/lua/strmacro.lua
+++ b/test/lua/strmacro.lua
@@ -1,10 +1,10 @@
return {
{
- Str = function (str)
- if str == "{{helloworld}}" then
+ Str = function (elem)
+ if elem.text == "{{helloworld}}" then
return pandoc.Emph {pandoc.Str "Hello, World"}
else
- return pandoc.Str(str)
+ return elem
end
end,
}