mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-31 11:13:59 +00:00
ox-publish: Fix error when two index entries were identical
* lisp/ox-publish.el (org-publish-index-generate-theindex): Fix error when two index entries were identical.
This commit is contained in:
parent
fb039937f9
commit
8e2318a722
@ -976,9 +976,10 @@ publishing directory."
|
||||
;; Compute the first difference between last entry and
|
||||
;; current one: it tells the level at which new items
|
||||
;; should be added.
|
||||
(let* ((rank (loop for n from 0 to (length entry)
|
||||
unless (equal (nth n entry) (nth n last-entry))
|
||||
return n))
|
||||
(let* ((rank (if (equal entry last-entry) (1- (length entry))
|
||||
(loop for n from 0 to (length entry)
|
||||
unless (equal (nth n entry) (nth n last-entry))
|
||||
return n)))
|
||||
(len (length (nthcdr rank entry))))
|
||||
;; For each term after the first difference, create
|
||||
;; a new sub-list with the term as body. Moreover,
|
||||
|
Loading…
Reference in New Issue
Block a user