Exporter: Replace newlines with commas in HTML, Readwise (#10788)

Resolves #10755.
reviewable/pr10328/r7
melyux 9 months ago committed by GitHub
parent 38aa74ec7c
commit 493a60faef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -101,7 +101,7 @@ function ReadwiseExporter:createHighlights(booknotes)
local highlight = {
text = clipping.text,
title = booknotes.title,
author = booknotes.author ~= "" and booknotes.author or nil, -- optional author
author = booknotes.author ~= "" and booknotes.author:gsub("\n", ", ") or nil, -- optional author
source_type = "koreader",
category = "books",
note = clipping.note,

@ -58,7 +58,7 @@
<div style="width:90%; max-width:600px; margin:0 auto; padding:5px; font-size:12pt; font-family:Georgia, serif">
#{ for _, booknotes in ipairs(clippings) do }#
<h2 style="font-size:18pt; text-align:right;">#{= htmlescape(booknotes.title) }#</h2>
<h5 style="font-size:12pt; text-align:right; color:gray;">#{= htmlescape(booknotes.author) }#</h5>
<h5 style="font-size:12pt; text-align:right; color:gray;">#{= htmlescape(booknotes.author:gsub("\n", ", ")) }#</h5>
#{ for _, chapter in ipairs(booknotes.chapters) do }#
#{ if chapter.title then }#
<div style="font-size:14pt; font-weight:bold; text-align:center; margin:0.5em;"><span>#{= htmlescape(chapter.title) }#</span></div>

Loading…
Cancel
Save