From e99681e1abb802e486a7042434ec2697585a9d0e Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 6 May 2021 21:53:04 +0200 Subject: Update --- filters/common_actions.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'filters') diff --git a/filters/common_actions.lua b/filters/common_actions.lua index 262f086..5b6c86b 100644 --- a/filters/common_actions.lua +++ b/filters/common_actions.lua @@ -1,12 +1,15 @@ function CodeBlock(el) if el.classes[1] == "plain" then el = pandoc.Div({el}, {class = 's-code'}) - else + elseif el.classes[1] then local formatted = pandoc.pipe('pygmentize', { '-l', el.classes[1], '-f', 'html', '-O', 'cssclass=s-code s-code--highlight' }, el.text) - el = pandoc.RawBlock('html', formatted) + + if formatted then + el = pandoc.RawBlock('html', formatted) + end end return el @@ -16,7 +19,7 @@ function Header(el) if el.level == 1 then local newchildren = pandoc.List() - newchildren:insert(pandoc.Span(el.content, {class = 's-body__title-inner'})) + newchildren:insert(pandoc.Span(el.content, {class = 's-headlines__title-inner'})) el.content = newchildren end -- cgit v1.2.3-54-g00ecf