fix: don't parse empty string as pages

pull/2349/head
Tienson Qin 2021-06-30 23:18:51 +08:00
parent e718b481a9
commit 370ac5ae82
2 changed files with 4 additions and 1 deletions

View File

@ -738,7 +738,9 @@
["Page_ref" page]
(let [label* (if (seq (mldoc/plain->text label)) label nil)]
(page-reference (:html-export? config) page config label*))
(if (and (string? page) (string/blank? page))
[:span (util/format "[[%s]]" page)]
(page-reference (:html-export? config) page config label*)))
["Search" s]
(cond

View File

@ -106,6 +106,7 @@
(cond
(and
(string? page)
(not (string/blank? page))
(text/block-ref? page))
(text/block-ref-un-brackets! page)