mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
export highlights only if highlighted text is not nil
This commit is contained in:
parent
92947ca858
commit
8b6bf2e72b
@ -320,7 +320,7 @@ end
|
|||||||
function ReaderHighlight:exportToClippings(page, item)
|
function ReaderHighlight:exportToClippings(page, item)
|
||||||
DEBUG("export highlight to My Clippings")
|
DEBUG("export highlight to My Clippings")
|
||||||
local clippings = io.open("/mnt/us/documents/My Clippings.txt", "a+")
|
local clippings = io.open("/mnt/us/documents/My Clippings.txt", "a+")
|
||||||
if clippings then
|
if clippings and item.text then
|
||||||
local current_locale = os.setlocale()
|
local current_locale = os.setlocale()
|
||||||
os.setlocale("C")
|
os.setlocale("C")
|
||||||
clippings:write(self.document.file:gsub("(.*/)(.*)", "%2").."\n")
|
clippings:write(self.document.file:gsub("(.*/)(.*)", "%2").."\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user