Skip to content

Commit fede1a7

Browse files
Use stringify to some extent
1 parent 5b5dbbb commit fede1a7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pandoc/paper.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@ function yamldata(data)
1717

1818
local newdata = {}
1919

20-
-- A bit ridiculous to do this to get strings
21-
newdata.title = pandoc.write(pandoc.Pandoc{data["title"]}, 'html')
20+
newdata.title = pandoc.utils.stringify(data["title"])
2221
newdata.url = pandoc.write(pandoc.Pandoc{data["url"]}, 'html')
2322
newdata.authors = data["authors"] or {}
24-
newdata.venue = pandoc.write(pandoc.Pandoc{data["venue"]}, 'html')
25-
newdata.year = pandoc.write(pandoc.Pandoc{data["year"]}, 'html')
23+
newdata.venue = pandoc.utils.stringify(data["venue"])
24+
newdata.year = pandoc.utils.stringify(data["year"])
2625
local files = data["files"] or pandoc.List()
2726

2827
newdata.files = files:map(function(data)
2928
local newfile = {}
3029

31-
newfile.text = pandoc.write(pandoc.Pandoc{data.text}, 'html')
32-
newfile.type = pandoc.write(pandoc.Pandoc{data.type}, 'html')
30+
newfile.text = pandoc.utils.stringify(data.text)
31+
newfile.type = pandoc.utils.stringify(data.type)
3332
newfile.src = pandoc.write(pandoc.Pandoc{data.src}, 'html')
3433

3534
return newfile

0 commit comments

Comments
 (0)