mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-24 09:16:43 +00:00
The `text` module is preloaded in lua. The module contains some UTF-8
aware string functions, implemented in Haskell. The module is loaded on
request only, e.g.:
text = require 'text'
function Str (s)
s.text = text.upper(s.text)
return s
end
10 lines
192 B
Lua
10 lines
192 B
Lua
local text = require 'text'
|
|
|
|
local function str_to_uppercase (s)
|
|
return pandoc.Str(text.upper(s.text))
|
|
end
|
|
|
|
function Header (el)
|
|
return pandoc.walk_block(el, {Str = str_to_uppercase})
|
|
end
|