aboutsummaryrefslogtreecommitdiff
path: root/COPYING.md
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert+github@zeitkraut.de>2017-11-20 18:37:40 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-11-20 09:37:40 -0800
commit849900c516f2aab60c675ae46dc87140165ef1da (patch)
treee97f2a41003950846dcbe313a4ac52f9a45f33e6 /COPYING.md
parent97efed8c23414bd85801538de7df42b9f38d1fe7 (diff)
downloadpandoc-849900c516f2aab60c675ae46dc87140165ef1da.tar.gz
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
Diffstat (limited to 'COPYING.md')
0 files changed, 0 insertions, 0 deletions