2017-11-18 13:33:37 -08:00
|
|
|
-- we use preloaded text to get a UTF-8 aware 'upper' function
|
|
|
|
local text = require('text')
|
2017-11-11 15:26:24 -08:00
|
|
|
|
2017-11-18 13:33:37 -08:00
|
|
|
-- capitalize level 1 headers
|
2017-11-11 15:26:24 -08:00
|
|
|
function Header(el)
|
|
|
|
if el.level == 1 then
|
|
|
|
return pandoc.walk_block(el, {
|
|
|
|
Str = function(el)
|
2017-11-18 13:33:37 -08:00
|
|
|
return pandoc.Str(text.upper(el.text))
|
2017-11-11 15:26:24 -08:00
|
|
|
end })
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-11-18 13:33:37 -08:00
|
|
|
-- replace links with link text
|
2017-11-11 15:26:24 -08:00
|
|
|
function Link(el)
|
|
|
|
return el.content
|
|
|
|
end
|
|
|
|
|
2017-11-18 13:33:37 -08:00
|
|
|
-- remove notes
|
2017-11-11 15:26:24 -08:00
|
|
|
function Note(el)
|
|
|
|
return {}
|
|
|
|
end
|