pandoc-lua-engine 0.4 → 0.4.1
raw patch · 4 files changed
+22/−1 lines, 4 files
Files
- pandoc-lua-engine.cabal +1/−1
- src/Text/Pandoc/Lua/Module/Pandoc.hs +1/−0
- src/Text/Pandoc/Lua/Module/Utils.hs +4/−0
- test/lua/module/pandoc-utils.lua +16/−0
pandoc-lua-engine.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: pandoc-lua-engine-version: 0.4+version: 0.4.1 build-type: Simple license: GPL-2.0-or-later license-file: COPYING.md
src/Text/Pandoc/Lua/Module/Pandoc.hs view
@@ -146,6 +146,7 @@ otherConstructors :: [DocumentedFunction PandocError] otherConstructors = [ mkAttr+ , mkCaption , mkCell , mkAttributeList , mkCitation
src/Text/Pandoc/Lua/Module/Utils.hs view
@@ -316,7 +316,11 @@ [ (fmap Shared.stringify . peekPandoc) , (fmap Shared.stringify . peekInline) , (fmap Shared.stringify . peekBlock)+ , (fmap Shared.stringify . peekCaption)+ , (fmap Shared.stringify . peekCell) , (fmap Shared.stringify . peekCitation)+ , (fmap Shared.stringify . peekTableHead)+ , (fmap Shared.stringify . peekTableFoot) , (fmap stringifyMetaValue . peekMetaValue) , (fmap (const "") . peekAttr) , (fmap (const "") . peekListAttributes)
test/lua/module/pandoc-utils.lua view
@@ -223,6 +223,22 @@ local inlines = pandoc.Inlines{pandoc.Str 'a', pandoc.Subscript('b')} assert.are_equal('ab', utils.stringify(inlines)) end),+ test('Caption', function ()+ local capt = pandoc.Caption(pandoc.Para{pandoc.Str 'a', pandoc.Emph('b')})+ assert.are_equal('ab', utils.stringify(capt))+ end),+ test('Cell', function ()+ local cell = pandoc.Cell(pandoc.Para{pandoc.Str 'a', pandoc.Emph('b')})+ assert.are_equal('ab', utils.stringify(cell))+ end),+ test('TableFoot', function ()+ local tf = pandoc.TableFoot{pandoc.Row{pandoc.Cell{pandoc.Plain "x y"}}}+ assert.are_equal('x y', utils.stringify(tf))+ end),+ test('TableHead', function ()+ local th = pandoc.TableHead{pandoc.Row{pandoc.Cell{pandoc.Plain "head1"}}}+ assert.are_equal('head1', utils.stringify(th))+ end), test('Meta', function () local meta = pandoc.Meta{ a = pandoc.Inlines 'funny and ',