diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2017-04-16 21:06:50 +0200 |
---|---|---|
committer | Albert Krewinkel <albert+github@zeitkraut.de> | 2017-04-26 23:28:40 +0200 |
commit | 9cd20c9b8b1fa3bd4581399327d61551558cf899 (patch) | |
tree | fc9c8769f453139f6d4286d84f1bb9fa7906d5b4 /test/lua | |
parent | 5416fb14aba9804ce4a227a4ebd8228d82aa658e (diff) | |
download | pandoc-9cd20c9b8b1fa3bd4581399327d61551558cf899.tar.gz |
Lua filter: allow filtering of meta data only
Diffstat (limited to 'test/lua')
-rw-r--r-- | test/lua/smallcaps-title.lua | 12 |
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 + } +} |