chris-website/defaultClasses.lua

20 lines
499 B
Lua
Raw Normal View History

local default_code_classes = {}
function add_default_code_class(el)
el.classes[#el.classes+1] = 'numberSource'
if #(el.classes) == 1 then
el.classes = default_code_classes
end
return el
end
function get_default_code_class(meta)
if meta['default-code-class'] then
default_code_classes = {pandoc.utils.stringify(meta['default-code-class'])}
end
end
return {{Meta = get_default_code_class},
{Code = add_default_code_class},
{CodeBlock = add_default_code_class}}