From 53079441f91c4aa790bb82bfd15ca939ed73e1f3 Mon Sep 17 00:00:00 2001 From: Mochitto <98263539+Mochitto@users.noreply.github.com> Date: Sat, 29 Apr 2023 01:21:00 +0200 Subject: [PATCH] Fix: exporting all notes and single doc now both use metadata for author and title (#10280) --- plugins/exporter.koplugin/clip.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/exporter.koplugin/clip.lua b/plugins/exporter.koplugin/clip.lua index 21be1188e..cc2276fb0 100644 --- a/plugins/exporter.koplugin/clip.lua +++ b/plugins/exporter.koplugin/clip.lua @@ -321,13 +321,13 @@ function MyClipping:parseHistoryFile(clippings, history_file, doc_file) return end local _, docname = util.splitFilePathName(doc_file) - local title, author = self:parseTitleFromPath(util.splitFileNameSuffix(docname), doc_file) - clippings[title] = { + local parsed_title, parsed_author = self:parseTitleFromPath(util.splitFileNameSuffix(docname), doc_file) + clippings[parsed_title] = { file = doc_file, - title = title, - author = author, + title = stored.stats.title or parsed_title, + author = stored.stats.authors or parsed_author, } - self:parseHighlight(stored.highlight, stored.bookmarks, clippings[title]) + self:parseHighlight(stored.highlight, stored.bookmarks, clippings[parsed_title]) end end