aboutsummaryrefslogtreecommitdiff
path: root/data/sample.lua
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-06-20 11:55:43 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-06-20 11:55:43 -0700
commit175cc2d44dab936e9245fbeb9cc30478359a97c7 (patch)
treea8c6c79e283c5a7cb9e7bb4c935117c6cde60f84 /data/sample.lua
parent58d60b1c85888697acec1edf54d166a864320717 (diff)
downloadpandoc-175cc2d44dab936e9245fbeb9cc30478359a97c7.tar.gz
Implement RawInline and RawBlock in sample lua custom writer.
Closes #2985.
Diffstat (limited to 'data/sample.lua')
-rw-r--r--data/sample.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/data/sample.lua b/data/sample.lua
index 574f378cc..0c07b632a 100644
--- a/data/sample.lua
+++ b/data/sample.lua
@@ -170,6 +170,12 @@ function Span(s, attr)
return "<span" .. attributes(attr) .. ">" .. s .. "</span>"
end
+function RawInline(format, str)
+ if format == "html" then
+ return str
+ end
+end
+
function Cite(s, cs)
local ids = {}
for _,cit in ipairs(cs) do
@@ -307,6 +313,12 @@ function Table(caption, aligns, widths, headers, rows)
return table.concat(buffer,'\n')
end
+function RawBlock(format, str)
+ if format == "html" then
+ return str
+ end
+end
+
function Div(s, attr)
return "<div" .. attributes(attr) .. ">\n" .. s .. "</div>"
end