fix toc entry for title which has a link
This commit is contained in:
parent
510c33c23d
commit
9858723403
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