mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 08:26:40 +00:00
enhance: import markdown quotes
Went ahead and implemented ast block to string as regex version of this would've been to buggy
This commit is contained in:
committed by
Gabriel Horner
parent
5b4f43d6f4
commit
8c6146a00d
@@ -212,7 +212,7 @@
|
||||
(is (= 4 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Task]] @conn))))
|
||||
(is (= 4 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Query]] @conn))))
|
||||
(is (= 2 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Card]] @conn))))
|
||||
(is (= 1 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Quote-block]] @conn))))
|
||||
(is (= 3 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Quote-block]] @conn))))
|
||||
|
||||
;; Properties and tags aren't included in this count as they aren't a Page
|
||||
(is (= 10
|
||||
@@ -421,9 +421,12 @@
|
||||
(is (= {:block/tags [:logseq.class/Quote-block]
|
||||
:logseq.property.node/display-type :quote}
|
||||
(db-test/readable-properties (db-test/find-block-by-content @conn #"Saito"))))
|
||||
(is (= "Saito: Cobb? Impossible. We were young men together. I'm an old man.\n...\nCobb: I've come back for you... to remind you of something. Something you once knew..."
|
||||
(:block/title (db-test/find-block-by-content @conn #"Saito")))
|
||||
"Quote node imports full multi-line quote"))
|
||||
(is (= "markdown quote\n[[wut]]\nline 3"
|
||||
(:block/title (db-test/find-block-by-content @conn #"markdown quote")))
|
||||
"Markdown quote imports as full multi-line quote")
|
||||
(is (= "*Italic* ~~Strikethrough~~ ^^Highlight^^ #[[foo]]\n**Learn Datalog Today** is an interactive tutorial designed to teach you the [Datomic](http://datomic.com/) dialect of [Datalog](http://en.wikipedia.org/wiki/Datalog). Datalog is a declarative **database query language** with roots in logic programming. Datalog has similar expressive power as [SQL](http://en.wikipedia.org/wiki/Sql)."
|
||||
(:block/title (db-test/find-block-by-content @conn #"Learn Datalog")))
|
||||
"Imports full quote with various ast types"))
|
||||
|
||||
(testing "tags convert to classes"
|
||||
(is (= :user.class/Quotes___life
|
||||
|
||||
Reference in New Issue
Block a user