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