mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: /scheduled doesn't work well if the content has extra spaces
at the end.
This commit is contained in:
@@ -83,4 +83,22 @@
|
||||
"**foobar" "foobar"
|
||||
"*********************foobar" "foobar")))
|
||||
|
||||
(deftest test-add-timestamp
|
||||
[]
|
||||
(are [x y] (= x y)
|
||||
(text/add-timestamp "LATER hello world\nhello"
|
||||
"scheduled"
|
||||
"<2021-08-25 Wed>")
|
||||
"LATER hello world\nSCHEDULED: <2021-08-25 Wed>\nhello"
|
||||
|
||||
(text/add-timestamp "LATER hello world "
|
||||
"scheduled"
|
||||
"<2021-08-25 Wed>")
|
||||
"LATER hello world\nSCHEDULED: <2021-08-25 Wed>"
|
||||
|
||||
(text/add-timestamp "LATER hello world\nfoo:: bar\ntest"
|
||||
"scheduled"
|
||||
"<2021-08-25 Wed>")
|
||||
"LATER hello world\nSCHEDULED: <2021-08-25 Wed>\nfoo:: bar\ntest"))
|
||||
|
||||
#_(cljs.test/test-ns 'frontend.text-test)
|
||||
|
||||
Reference in New Issue
Block a user