mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Exporter: Replace newlines with commas in HTML, Readwise (#10788)
Resolves #10755.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user