From 17f6621b21fa9c5b64f58e4da38a3ce53b50f7b9 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 18 Nov 2017 13:33:37 -0800 Subject: Update man page lua filter to use text module. --- doc/lua-filters.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/lua-filters.md b/doc/lua-filters.md index a5c9905ab..35610cea3 100644 --- a/doc/lua-filters.md +++ b/doc/lua-filters.md @@ -344,11 +344,14 @@ inside headers), removes footnotes, and replaces links with regular text. ``` lua +-- we use preloaded text to get a UTF-8 aware 'upper' function +local text = require('text') + function Header(el) if el.level == 1 then return pandoc.walk_block(el, { Str = function(el) - return pandoc.Str(el.text:upper()) + return pandoc.Str(text.upper(el.text)) end }) end end -- cgit v1.2.3