|
@@ -43,6 +43,15 @@
|
|
|
(util/format "{{%s %s}}" name arg))
|
|
(util/format "{{%s %s}}" name arg))
|
|
|
original)))))
|
|
original)))))
|
|
|
|
|
|
|
|
|
|
+(defn- fenced-code-transform
|
|
|
|
|
+ [text]
|
|
|
|
|
+ (string/replace text
|
|
|
|
|
+ #"```([a-z]*\n[\s\S]*?\n*)```"
|
|
|
|
|
+ (fn [[_ match]]
|
|
|
|
|
+ (str "```"
|
|
|
|
|
+ (str match "\n")
|
|
|
|
|
+ "```"))))
|
|
|
|
|
+
|
|
|
(defn load-all-refed-uids!
|
|
(defn load-all-refed-uids!
|
|
|
[data]
|
|
[data]
|
|
|
(let [full-text (atom "")]
|
|
(let [full-text (atom "")]
|
|
@@ -66,7 +75,8 @@
|
|
|
(string/replace "{{[[TODO]]}}" "TODO")
|
|
(string/replace "{{[[TODO]]}}" "TODO")
|
|
|
(string/replace "{{[[DONE]]}}" "DONE")
|
|
(string/replace "{{[[DONE]]}}" "DONE")
|
|
|
(uid-transform)
|
|
(uid-transform)
|
|
|
- (macro-transform)))
|
|
|
|
|
|
|
+ (macro-transform)
|
|
|
|
|
+ (fenced-code-transform)))
|
|
|
|
|
|
|
|
(declare children->text)
|
|
(declare children->text)
|
|
|
(defn child->text
|
|
(defn child->text
|