diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-08-08 23:14:12 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-08-08 23:14:12 -0700 |
commit | e9de0f0e22b9b64b5684efe81d03539c3f57a71c (patch) | |
tree | 6a5f6a6ad5d4cf95f4e3ea3106a7db9c1a97b547 /data | |
parent | 99bb066bb925134b506d39c8d6694fe81337d9c1 (diff) | |
download | pandoc-e9de0f0e22b9b64b5684efe81d03539c3f57a71c.tar.gz |
Preliminary support for new Div and Span elements in writers.
Currently these are "transparent" containers, except in HTML,
where they produce div and span elements with attributes.
Diffstat (limited to 'data')
-rw-r--r-- | data/sample.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/data/sample.lua b/data/sample.lua index 1c82ebe2e..a7e9d6337 100644 --- a/data/sample.lua +++ b/data/sample.lua @@ -177,6 +177,10 @@ function Note(s) '"><sup>' .. num .. '</sup></a>' end +function Span(s, attr) + return "<span" .. attributes(attr) .. ">" .. s .. "</span>" +end + function Plain(s) return s end @@ -299,6 +303,10 @@ function Table(caption, aligns, widths, headers, rows) return table.concat(buffer,'\n') end +function Div(s, attr) + return "<div" .. attributes(attr) .. ">\n" .. s .. "</div>" +end + -- The following code will produce runtime warnings when you haven't defined -- all of the functions you need for the custom writer, so it's useful -- to include when you're working on a writer. |