git.iko.soy/typeable/pandoc
on master help sign in
Implement RawInline and RawBlock in sample lua custom writer.
175cc2dJohn MacFarlane
data/sample.lua+12
@@ -170,6 +170,12 @@ function Span(s, attr)
170 return "<span" .. attributes(attr) .. ">" .. s .. "</span>"
170 return "<span" .. attributes(attr) .. ">" .. s .. "</span>"
171end
171end
172
172
173+function RawInline(format, str)
174+ if format == "html" then
175+ return str
176+ end
177+end
178+
173function Cite(s, cs)
179function Cite(s, cs)
174 local ids = {}
180 local ids = {}
175 for _,cit in ipairs(cs) do
181 for _,cit in ipairs(cs) do
@@ -307,6 +313,12 @@ function Table(caption, aligns, widths, headers, rows)
307 return table.concat(buffer,'\n')
313 return table.concat(buffer,'\n')
308end
314end
309
315
316+function RawBlock(format, str)
317+ if format == "html" then
318+ return str
319+ end
320+end
321+
310function Div(s, attr)
322function Div(s, attr)
311 return "<div" .. attributes(attr) .. ">\n" .. s .. "</div>"
323 return "<div" .. attributes(attr) .. ">\n" .. s .. "</div>"
312end
324end