diff options
| author | Albert Krewinkel <[email protected]> | 2023-03-20 14:55:12 +0100 |
|---|---|---|
| committer | Albert Krewinkel <[email protected]> | 2023-03-20 16:06:19 +0100 |
| commit | 0e4b397e7081eb20c55efc051c7caddaffd697f8 (patch) | |
| tree | cca1460f28beb8924848496d2b54716deaf3c0d0 /pandoc-lua-engine/test | |
| parent | 936f44d46013bb70e693a5f2947aae097cb48b5f (diff) | |
Lua: fix json.encode for nested AST elements.
Ensures that objects with nested AST elements can be encoded as JSON.
Diffstat (limited to 'pandoc-lua-engine/test')
| -rw-r--r-- | pandoc-lua-engine/test/lua/module/pandoc-json.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pandoc-lua-engine/test/lua/module/pandoc-json.lua b/pandoc-lua-engine/test/lua/module/pandoc-json.lua index c2d4f86d4..46400d572 100644 --- a/pandoc-lua-engine/test/lua/module/pandoc-json.lua +++ b/pandoc-lua-engine/test/lua/module/pandoc-json.lua @@ -64,6 +64,12 @@ return { 'string' ) end), + test('Nested Inline', function () + assert.are_equal( + json.encode({spc = pandoc.Space()}), + '{"spc":{"t":"Space"}}' + ) + end) }, group 'decode' { |
