From 9cd20c9b8b1fa3bd4581399327d61551558cf899 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sun, 16 Apr 2017 21:06:50 +0200 Subject: Lua filter: allow filtering of meta data only --- test/lua/smallcaps-title.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/lua/smallcaps-title.lua (limited to 'test/lua') diff --git a/test/lua/smallcaps-title.lua b/test/lua/smallcaps-title.lua new file mode 100644 index 000000000..b839ee131 --- /dev/null +++ b/test/lua/smallcaps-title.lua @@ -0,0 +1,12 @@ +return { + { + Meta = function(meta) + -- The call to `MetaInlines` is redundant and used for testing purposes + -- only. The explicit use of a MetaValue constructor is only useful when + -- used with an empty table: `MetaInlines{}` is read differently than + -- `MetaBlocks{}`. + meta.title = pandoc.MetaInlines{pandoc.SmallCaps(meta.title)} + return meta + end + } +} -- cgit v1.2.3