feat: Pairing with Phil - allow colons in title

parent 9a3fcdf1
......@@ -13,8 +13,8 @@ headline = stars [s priority] [s comment-flag] s title [s tags] eol
stars = #'\*+'
priority = <"[#"> #"[A-Z]" <"]">
comment-flag = <"COMMENT">
title = !tags word {<whitespace+> !tags word}
tags = <':'> { tag <':'> }
title = !tags word {s !tags word}
tags = <':'> ( tag <':'> )+
<tag> = #'[a-zA-Z0-9_@#%]+'
......
......@@ -31,4 +31,7 @@
(parse "**** [#B] hello world :the:end:"))))
(testing "with comment flag"
(is (= [:headline [:stars "*****"] [:comment-flag] [:title "hello" "world"]]
(parse "***** COMMENT hello world"))))))
(parse "***** COMMENT hello world"))))
(testing "with crazy characters in title"
(is (= [:headline [:stars "*****"] [:title "hello" "world" ":"]]
(parse "***** hello world :"))))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment