From 8b6bf2e72b1beadc6fe2e42f1374c77634c854d6 Mon Sep 17 00:00:00 2001 From: chrox Date: Sun, 20 Oct 2013 12:32:35 +0800 Subject: [PATCH] export highlights only if highlighted text is not nil --- frontend/ui/reader/readerhighlight.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ui/reader/readerhighlight.lua b/frontend/ui/reader/readerhighlight.lua index 3fcf5605b..db98334f6 100644 --- a/frontend/ui/reader/readerhighlight.lua +++ b/frontend/ui/reader/readerhighlight.lua @@ -320,7 +320,7 @@ end function ReaderHighlight:exportToClippings(page, item) DEBUG("export highlight to My Clippings") 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() os.setlocale("C") clippings:write(self.document.file:gsub("(.*/)(.*)", "%2").."\n")