summaryrefslogtreecommitdiffstats
path: root/filters/element_classes.lua
blob: 643ff756db3fb36f118babdc093f803fa81f950b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function CodeBlock(el)
    el.attributes.class = 'c-page__prefixed c-page__prefixed--pre'
    return el
end

function Header(el)
    if el.level == 1 then
        el.attributes.class = 'c-page__prefixed c-page__prefixed--h1'
    elseif el.level == 2 then
        el.attributes.class = 'c-page__prefixed c-page__prefixed--h2'
    elseif el.level == 3 then
        el.attributes.class = 'c-page__prefixed c-page__prefixed--h3'
    end
    return el
end