Merge pull request #71 from matsu911/master
Fix toc entries for titles which are links
This commit is contained in:
commit
a4ab7f1409
1 changed files with 6 additions and 2 deletions
|
@ -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))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue