summaryrefslogtreecommitdiffstats
path: root/filters/code.lua
blob: 41da4d79d36c4dbaa6d70fb40f8c24dcd168e78a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local common = require 'filters.lib.common'

function CodeBlock(el)
    if el.classes[1] == "plain" then
        el = pandoc.Div({ el }, { class = 's-code' })
    -- 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)
    -- 
    --     if formatted then el = pandoc.RawBlock('html', formatted) end
    end

    return common.wide(el)
end