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)]
|
(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))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue