Exporter: memos, replace space with underscore for # tag creation (#11107)

Creating tags on memos looked like "#This is a book title" meaning only "#This" would become a Tag. Replacing spaces with underscore to be more usable so that the following tag would be created "#This_is_a_book_title"
pull/11315/merge
lbesnard 4 months ago committed by GitHub
parent 9826615f06
commit 5a3f73766c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -135,7 +135,7 @@ function MemosExporter:createHighlights(booknotes)
if clipping.note then
highlight = highlight .. clipping.note .. "\n\n"
end
highlight = highlight .. booknotes.title .. " (page: " .. clipping.page .. "\n\n #" .. booknotes.title .. " #koreader"
highlight = highlight .. booknotes.title .. " (page: " .. clipping.page .. "\n\n #" .. booknotes.title:gsub("%s+", "_") .. " #koreader"
local result, err = makeRequest("POST", { content = highlight }, self.settings.api, self.settings.token)
if not result then
logger.warn("error creating highlights", err)

Loading…
Cancel
Save