From ad478954cf77842364d03e1d5ee85e366e699ee7 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 7 Jan 2021 08:50:48 +0100 Subject: Improved general structure, resolve category name in metadata filter, added hideable nav items, added header for page layout --- filters/common_actions.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'filters/common_actions.lua') diff --git a/filters/common_actions.lua b/filters/common_actions.lua index 1d13e3a..a358b99 100644 --- a/filters/common_actions.lua +++ b/filters/common_actions.lua @@ -2,7 +2,10 @@ function CodeBlock(el) if next(el.classes) == nil then el.classes = el.classes .. {'c-page__prefixed', 'c-page__prefixed--pre'} else - local formatted = pandoc.pipe('pygmentize', {'-l', el.classes[1], '-f', 'html', '-O', 'cssclass=c-page__code s-code'}, el.text) + local formatted = pandoc.pipe('pygmentize', { + '-l', el.classes[1], '-f', 'html', '-O', + 'cssclass=c-page__code s-code' + }, el.text) el = pandoc.RawBlock('html', formatted) end @@ -21,9 +24,7 @@ function Header(el) end function Div(el) - if el.attributes.macro == nil then - return el - end + if el.attributes.macro == nil then return el end if el.attributes.macro == 'refs' and el.content[1].tag == 'BulletList' then local newchildren = pandoc.List() @@ -31,7 +32,8 @@ function Div(el) newchildren:insert(pandoc.RawBlock('html', '