fix: handle empty block embed

This commit is contained in:
Yukun Guo
2020-12-30 21:25:32 +08:00
committed by Tienson Qin
parent e89cab7133
commit 67400df0ea

View File

@@ -690,6 +690,9 @@
(= name "embed")
(let [a (first arguments)]
(cond
(nil? a) ; empty embed
nil
(and (string/starts-with? a "[[")
(string/ends-with? a "]]"))
(let [page-name (-> (string/replace a "[[" "")