849900c516
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 |
||
---|---|---|
.. | ||
attr-test.lua | ||
block-count.lua | ||
hello-world-doc.lua | ||
implicit-doc-filter.lua | ||
markdown-reader.lua | ||
metatable-catch-all.lua | ||
plain-to-para.lua | ||
single-to-double-quoted.lua | ||
smallcaps-title.lua | ||
strmacro.lua | ||
undiv.lua | ||
uppercase-header.lua |