Merge pull request #71 from matsu911/master

Fix toc entries for titles which are links
This commit is contained in:
Carmen La 2016-10-22 23:19:25 -04:00 committed by GitHub
commit a4ab7f1409

View file

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