Fix language tag spans to Pandoc's format

parent 91eaeeee
......@@ -2,5 +2,20 @@ require("ccm_toolkit/filters-common")
-- Kill off archaic convestion of small caps for names and verse references
Span = function (element)
return (#element.classes == 1 and hasClass(element, { "sc" })) and element.content or element
if (#element.classes == 1 and hasClass(element, { "sc" })) then
return element.content
end
if (#element.classes == 1 and hasClass(element, { "Latin" })) then
element.classes = {}
element.attributes[#element.attributes+1] = { "lang", "la" }
end
if (#element.classes == 1 and hasClass(element, { "Hebrew" })) then
element.classes = {}
element.attributes[#element.attributes+1] = { "lang", "he" }
end
if (#element.classes == 1 and hasClass(element, { "Greek" })) then
element.classes = {}
element.attributes[#element.attributes+1] = { "lang", "el" }
end
return element
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment