mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
feat: simplified markdown properties wip
This commit is contained in:
@@ -99,7 +99,7 @@
|
||||
|
||||
(defn remove-id-property
|
||||
[]
|
||||
(are [x y] (= (text/remove-id-property x) y)
|
||||
(are [x y] (= (text/remove-id-property! x) y)
|
||||
"hello\n:PROPERTIES:\n:id: f9873a81-07b9-4246-b910-53a6f5ec7e04\n:END:\n"
|
||||
"hello\n:PROPERTIES:\n:END:"
|
||||
|
||||
@@ -126,16 +126,16 @@
|
||||
(defn test-insert-property
|
||||
[]
|
||||
(are [x y] (= x y)
|
||||
(text/insert-property "hello" "a" "b")
|
||||
(text/insert-property! :org "hello" "a" "b")
|
||||
"hello\n:PROPERTIES:\n:a: b\n:END:\n"
|
||||
|
||||
(text/insert-property "hello" "a" false)
|
||||
(text/insert-property! :org "hello" "a" false)
|
||||
"hello\n:PROPERTIES:\n:a: false\n:END:\n"
|
||||
|
||||
(text/insert-property "hello\n:PROPERTIES:\n:a: b\n:END:\n" "c" "d")
|
||||
(text/insert-property! :org "hello\n:PROPERTIES:\n:a: b\n:END:\n" "c" "d")
|
||||
"hello\n:PROPERTIES:\n:a: b\n:c: d\n:END:"
|
||||
|
||||
(text/insert-property "hello\n:PROPERTIES:\n:a: b\n:END: world\n" "c" "d")
|
||||
(text/insert-property! :org "hello\n:PROPERTIES:\n:a: b\n:END: world\n" "c" "d")
|
||||
"hello\n:PROPERTIES:\n:c: d\n:END:\n:PROPERTIES:\n:a: b\n:END: world\n"))
|
||||
|
||||
(defn test->new-properties
|
||||
|
||||
Reference in New Issue
Block a user