Explorar el Código

fix(editor): asset link when drop PDF file

Andelf hace 3 años
padre
commit
941de325b8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/main/frontend/handler/editor.cljs

+ 1 - 1
src/main/frontend/handler/editor.cljs

@@ -1345,7 +1345,7 @@
 
 
 (defn get-asset-file-link
 (defn get-asset-file-link
   [format url file-name image?]
   [format url file-name image?]
-  (let [pdf? (and url (string/ends-with? url ".pdf"))]
+  (let [pdf? (and url (string/ends-with? (string/lower-case url) ".pdf"))]
     (case (keyword format)
     (case (keyword format)
       :markdown (util/format (str (when (or image? pdf?) "!") "[%s](%s)") file-name url)
       :markdown (util/format (str (when (or image? pdf?) "!") "[%s](%s)") file-name url)
       :org (if image?
       :org (if image?