Skip to content

Commit

Permalink
- fix issuse ardumont#53
Browse files Browse the repository at this point in the history
  • Loading branch information
xiliuya committed May 25, 2023
1 parent 3d724e5 commit b6e0d34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion markdown-toc.el
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ Default to identity function (do nothing)."

(defun markdown-toc--compute-toc-structure (imenu-index)
"Given a IMENU-INDEX, compute the TOC structure."
(--mapcat (markdown-toc--compute-toc-structure-from-level 0 it) imenu-index))
(--mapcat (markdown-toc--compute-toc-structure-from-level
(if (eq markdown-toc-user-toc-structure-manipulation-fn 'cdr)
-1
0)
it)
imenu-index))

(defun markdown-toc--symbol (sym n)
"Compute the repetition of a symbol SYM N times as a string."
Expand Down

0 comments on commit b6e0d34

Please sign in to comment.