mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 17:06:23 +00:00
add tests
This commit is contained in:
@@ -97,11 +97,11 @@
|
||||
|
||||
(defn- markdown-blocks?
|
||||
[text]
|
||||
(util/safe-re-find #"(?m)^\s*(?:[-+*]|#+)\s+" text))
|
||||
(boolean (util/safe-re-find #"(?m)^\s*(?:[-+*]|#+)\s+" text)))
|
||||
|
||||
(defn- org-blocks?
|
||||
[text]
|
||||
(util/safe-re-find #"(?m)^\s*\*+\s+" text))
|
||||
(boolean (util/safe-re-find #"(?m)^\s*\*+\s+" text)))
|
||||
|
||||
(defn- paste-copied-blocks-or-text
|
||||
;; todo: logseq/whiteboard-shapes is now text/html
|
||||
@@ -218,8 +218,6 @@
|
||||
(let [clipboard-data (gobj/get e "clipboardData")
|
||||
html (.getData clipboard-data "text/html")
|
||||
text (.getData clipboard-data "text")]
|
||||
(prn {:html html
|
||||
:text text})
|
||||
(cond
|
||||
(and (string/blank? text) (string/blank? html))
|
||||
(paste-file-if-exists id e)
|
||||
|
||||
Reference in New Issue
Block a user