summaryrefslogtreecommitdiff
path: root/data/sample.lua
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-10-23 20:00:07 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2016-10-23 20:00:07 +0200
commit422b861edce01e7cd60980dfabf15669a656b539 (patch)
tree971ea06ec0778d65590f1cf7a00c927041ee0e9f /data/sample.lua
parent696dfbc993691933f01241bbb7f2f379f45b99a5 (diff)
Handle line blocks in sample.lua custom lua writer.
Diffstat (limited to 'data/sample.lua')
-rw-r--r--data/sample.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/data/sample.lua b/data/sample.lua
index 0c07b632a..e23154a96 100644
--- a/data/sample.lua
+++ b/data/sample.lua
@@ -206,6 +206,11 @@ function HorizontalRule()
return "<hr/>"
end
+function LineBlock(ls)
+ return '<div style="white-space: pre-line;">' .. table.concat(ls, '\n') ..
+ '</div>'
+end
+
function CodeBlock(s, attr)
-- If code block has class 'dot', pipe the contents through dot
-- and base64, and include the base64-encoded png as a data: URL.