function CodeBlock(el) if el.classes[1] == "plain" then el = pandoc.Div({el}, {class = 's-code'}) else 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) end return el end function Header(el) if el.level == 1 then local newchildren = pandoc.List() newchildren:insert(pandoc.Span(el.content, {class = 's-body__title-inner'})) el.content = newchildren end return el end function Div(el) 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() newchildren:insert(pandoc.RawBlock('html', '')) el.content = newchildren end return el.content end