Fix crash exporting to Markdown with missing authors (#10278)

reviewable/pr10369/r1
Mochitto 1 year ago committed by GitHub
parent 53079441f9
commit 0db042fd0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -39,7 +39,8 @@ local function prepareBookContent(book, formatting_options, highlight_formatting
local content = ""
local current_chapter = nil
content = content .. "# " .. book.title .. "\n"
content = content .. "##### " .. book.author:gsub("\n", ", ") .. "\n\n"
local author = book.author or _("N/A")
content = content .. "##### " .. author:gsub("\n", ", ") .. "\n\n"
for _, note in ipairs(book) do
local entry = note[1]
if entry.chapter ~= current_chapter then

Loading…
Cancel
Save