From e110492d164a51f2238f7877e213d16b1bcc8888 Mon Sep 17 00:00:00 2001 From: chrox Date: Thu, 15 May 2014 20:04:59 +0800 Subject: [PATCH] fix no page field in pos when reflowing --- plugins/evernote.koplugin/clip.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/evernote.koplugin/clip.lua b/plugins/evernote.koplugin/clip.lua index 7c937ebb3..5c0526b73 100644 --- a/plugins/evernote.koplugin/clip.lua +++ b/plugins/evernote.koplugin/clip.lua @@ -233,8 +233,12 @@ function MyClipping:parseHighlight(highlights, book) clipping.sort = "highlight" clipping.time = self:getTime(item.datetime or "") clipping.text = self:getText(item.text) - if item.pos0 and item.pos1 and item.pos0.x and item.pos0.y - and item.pos1.x and item.pos1.y then + if item.pos0 and item.pos1 and + item.pos0.x and item.pos0.y and + item.pos1.x and item.pos1.y then + -- highlights in reflowing mode don't have page in pos + if item.pos0.page == nil then item.pos0.page = page end + if item.pos1.page == nil then item.pos1.page = page end local image = {} image.file = book.file image.pos0, image.pos1 = item.pos0, item.pos1