fix toc entry for title which has a link

This commit is contained in:
Shigeaki Matsumura 2016-10-23 12:04:29 +09:00
parent 510c33c23d
commit 9858723403

View file

@ -55,8 +55,12 @@
(let [anchor (or id name)] (let [anchor (or id name)]
(if (nil? anchor) (if (nil? anchor)
(recur zp (rest items)) (recur zp (rest items))
(recur (insert-toc-tree-entry (recur (insert-toc-tree-entry zp
zp {:tag tag :anchor anchor :text (or title (first htext))}) {:tag tag
:anchor anchor
:text (or
(if (string? title) title (-> title :content first))
(first htext))})
(rest items)))) (rest items))))
(z/root zp)))) (z/root zp))))