pandoc/test/lua
Albert Krewinkel 849900c516 data/pandoc.lua: enable table-like behavior of attributes (#4080)
Attribute lists are represented as associative lists in Lua. Pure
associative lists are awkward to work with. A metatable is attached to
attribute lists, allowing to access and use the associative list as if
the attributes were stored in as normal key-value pair in table.

Note that this changes the way `pairs` works on attribute lists. Instead
of producing integer keys and two-element tables, the resulting iterator
function now returns the key and value of those pairs.  Use `ipairs` to
get the old behavior.

Warning: the new iteration mechanism only works if pandoc has been
compiled with Lua 5.2 or later (current default: 5.3).

The `pandoc.Attr` function is altered to allow passing attributes as
key-values in a normal table. This is more convenient than having to
construct the associative list which is used internally.

Closes #4071
2017-11-20 09:37:40 -08:00
..
attr-test.lua data/pandoc.lua: enable table-like behavior of attributes (#4080) 2017-11-20 09:37:40 -08:00
block-count.lua Text.Pandoc.Lua: support Inline and Block catch-alls 2017-08-22 23:30:48 +02:00
hello-world-doc.lua data/pandoc.lua: regularize constructors. 2017-06-29 17:08:59 +02:00
implicit-doc-filter.lua data/pandoc.lua: regularize constructors. 2017-06-29 17:08:59 +02:00
markdown-reader.lua Lua module: provide simple read format parser 2017-04-26 23:28:40 +02:00
metatable-catch-all.lua Text.Pandoc.Lua: respect metatable when getting filters 2017-08-22 22:56:51 +02:00
plain-to-para.lua Lua filter: revert to non-destructuring filters 2017-04-15 21:40:48 +02:00
single-to-double-quoted.lua Lua filters: Remove special treatment of Quoted, Math. 2017-06-29 15:47:27 +02:00
smallcaps-title.lua Lua filter: allow filtering of meta data only 2017-04-26 23:28:40 +02:00
strmacro.lua Lua filter: revert to non-destructuring filters 2017-04-15 21:40:48 +02:00
undiv.lua Allow lua filters to return lists of elements 2017-09-24 12:04:15 -07:00
uppercase-header.lua Lua filters: preload text module (#4077) 2017-11-18 13:24:06 -08:00