From a268a179fd28356a2661161d050f6d754d2a4fec Mon Sep 17 00:00:00 2001 From: rcmerci Date: Tue, 1 Jun 2021 11:35:46 +0800 Subject: [PATCH] exported opml add title tag --- src/main/frontend/format/adoc.cljs | 2 +- src/main/frontend/format/mldoc.cljs | 8 ++++---- src/main/frontend/format/protocol.cljs | 2 +- src/main/frontend/handler/export.cljs | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/frontend/format/adoc.cljs b/src/main/frontend/format/adoc.cljs index 007d4914e..8e33ea3c6 100644 --- a/src/main/frontend/format/adoc.cljs +++ b/src/main/frontend/format/adoc.cljs @@ -29,5 +29,5 @@ ok-handler)) (exportMarkdown [this content config references] (throw "not support")) - (exportOPML [this content config] + (exportOPML [this content config title] (throw "not support"))) diff --git a/src/main/frontend/format/mldoc.cljs b/src/main/frontend/format/mldoc.cljs index fd1f0c2d5..83634f127 100644 --- a/src/main/frontend/format/mldoc.cljs +++ b/src/main/frontend/format/mldoc.cljs @@ -62,8 +62,8 @@ (or references default-references))) (defn parse-export-opml - [content config] - (parseAndExportOPML content config)) + [content config title] + (parseAndExportOPML content config title)) (defn ast-export-markdown [ast config references] @@ -244,8 +244,8 @@ true) (exportMarkdown [this content config references] (parse-export-markdown content config references)) - (exportOPML [this content config] - (parse-export-opml content config))) + (exportOPML [this content config title] + (parse-export-opml content config title))) (defn plain->text [plains] diff --git a/src/main/frontend/format/protocol.cljs b/src/main/frontend/format/protocol.cljs index 270812fea..f916a4e27 100644 --- a/src/main/frontend/format/protocol.cljs +++ b/src/main/frontend/format/protocol.cljs @@ -6,4 +6,4 @@ (loaded? [this]) (lazyLoad [this ok-handler]) (exportMarkdown [this content config references]) - (exportOPML [this content config])) + (exportOPML [this content config title])) diff --git a/src/main/frontend/handler/export.cljs b/src/main/frontend/handler/export.cljs index b56eeb2e8..075544218 100644 --- a/src/main/frontend/handler/export.cljs +++ b/src/main/frontend/handler/export.cljs @@ -430,7 +430,8 @@ (mapv (fn [{:keys [path content names format]}] (when (first names) [path (fp/exportOPML f/mldoc-record content - (f/get-default-config format))]))) + (f/get-default-config format) + (first names))]))) (remove nil?))) (defn- convert-md-files-unordered-list-or-heading