summaryrefslogtreecommitdiffstats
path: root/filters
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2021-01-07 20:23:18 +0100
committerVolpeon <git@volpeon.ink>2021-01-07 20:23:18 +0100
commitb846debebc24a699b9feef9af10233ff1a876bbd (patch)
tree50edda285a541cbd161a3f2225a099fbbe397b5f /filters
parentImproved general structure, resolve category name in metadata filter, added h... (diff)
downloadvolpeon.ink-b846debebc24a699b9feef9af10233ff1a876bbd.tar.gz
volpeon.ink-b846debebc24a699b9feef9af10233ff1a876bbd.tar.bz2
volpeon.ink-b846debebc24a699b9feef9af10233ff1a876bbd.zip
Small design adjustments, added support for code blocks marked as 'plain'
Diffstat (limited to 'filters')
-rw-r--r--filters/common_actions.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/filters/common_actions.lua b/filters/common_actions.lua
index a358b99..abb15a1 100644
--- a/filters/common_actions.lua
+++ b/filters/common_actions.lua
@@ -1,6 +1,8 @@
1function CodeBlock(el) 1function CodeBlock(el)
2 if next(el.classes) == nil then 2 if next(el.classes) == nil then
3 el.classes = el.classes .. {'c-page__prefixed', 'c-page__prefixed--pre'} 3 el.classes = el.classes .. {'c-page__prefixed', 'c-page__prefixed--pre'}
4 elseif el.classes[1] == "plain" then
5 el = pandoc.Div({el}, {class = 'c-page__code s-code s-code--plain'})
4 else 6 else
5 local formatted = pandoc.pipe('pygmentize', { 7 local formatted = pandoc.pipe('pygmentize', {
6 '-l', el.classes[1], '-f', 'html', '-O', 8 '-l', el.classes[1], '-f', 'html', '-O',