pandoc/doc
Albert Krewinkel d0261d7387 Lua filters: allow passing of HTML-like tables instead of Attr (#5750)
Attr values can now be given as normal Lua tables; this can be used as a
convenient alternative to define Attr values, instead of constructing
values with `pandoc.Attr`. Identifiers are taken from the *id* field,
classes must be given as space separated words in the *class* field. All
remaining fields are included as misc attributes.

With this change, the following lines now create equal elements:

    pandoc.Span('test', {id = 'test', class = 'a b', check = 1})
    pandoc.Span('test', pandoc.Attr('test', {'a','b'}, {check = 1}))

This also works when using the *attr* setter:

    local span = pandoc.Span 'text'
    span.attr = {id = 'test', class = 'a b', check = 1}

Furthermore, the *attributes* field of AST elements can now be a plain
key-value table even when using the `attributes` accessor:

    local span = pandoc.Span 'test'
    span.attributes = {check = 1}   -- works as expected now

Closes: #5744
2019-09-15 12:11:58 -07:00
..
customizing-pandoc.md Fix broken links in documents (#5473) 2019-05-01 20:09:36 -04:00
epub.md Fix broken links in documents (#5473) 2019-05-01 20:09:36 -04:00
filters.md Fix broken links in documents (#5473) 2019-05-01 20:09:36 -04:00
getting-started.md Fix broken links in documents (#5473) 2019-05-01 20:09:36 -04:00
lua-filters.md Lua filters: allow passing of HTML-like tables instead of Attr (#5750) 2019-09-15 12:11:58 -07:00
org.md doc/org.md: improve documentation of org features 2018-12-29 15:20:44 +01:00
using-the-pandoc-api.md Fix broken links in documents (#5473) 2019-05-01 20:09:36 -04:00