فهرست منبع

Fix asset link creating invalid page for org mode

Gabriel Horner 2 سال پیش
والد
کامیت
fe24b61beb
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 1 0
      deps/graph-parser/src/logseq/graph_parser/block.cljs
  2. 2 1
      deps/graph-parser/test/logseq/graph_parser_test.cljs

+ 1 - 0
deps/graph-parser/src/logseq/graph_parser/block.cljs

@@ -56,6 +56,7 @@
 
                   (and (= url-type "Search")
                        (= format :org)
+                       (not (gp-config/local-asset? value))
                        value)
 
                   (and

+ 2 - 1
deps/graph-parser/test/logseq/graph_parser_test.cljs

@@ -390,7 +390,8 @@
                                "foo.org"
                                (str "* [[bar][title]]\n"
                                     ;; all of the uris below do not create pages
-                                    "* [[https://example.com][example]]"))
+                                    "* [[https://example.com][example]]\n"
+                                    "* [[../assets/conga_parrot.gif][conga]]"))
       (is (= #{"foo" "bar"}
              (->> (d/q '[:find (pull ?b [*])
                          :in $