aboutsummaryrefslogtreecommitdiff
path: root/test/lua
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-04-16 21:06:50 +0200
committerAlbert Krewinkel <albert+github@zeitkraut.de>2017-04-26 23:28:40 +0200
commit9cd20c9b8b1fa3bd4581399327d61551558cf899 (patch)
treefc9c8769f453139f6d4286d84f1bb9fa7906d5b4 /test/lua
parent5416fb14aba9804ce4a227a4ebd8228d82aa658e (diff)
downloadpandoc-9cd20c9b8b1fa3bd4581399327d61551558cf899.tar.gz
Lua filter: allow filtering of meta data only
Diffstat (limited to 'test/lua')
-rw-r--r--test/lua/smallcaps-title.lua12
1 files changed, 12 insertions, 0 deletions
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
+ }
+}