Skip to content

Commit 3e88d58

Browse files
committed
Merge pull request #100 from cosmicexplorer/fix/line-numbering-loop
fix cleanup-list-numbers infinite loop
2 parents acd2c4c + 6c44b03 commit 3e88d58

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

markdown-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5166,8 +5166,9 @@ a list."
51665166
(setq cpfx (match-string-no-properties 1))
51675167
(cond
51685168
((string= cpfx pfx)
5169-
(replace-match
5170-
(concat pfx (number-to-string (setq idx (1+ idx))) ". "))
5169+
(save-excursion
5170+
(replace-match
5171+
(concat pfx (number-to-string (setq idx (1+ idx))) ". ")))
51715172
(setq sep nil))
51725173
;; indented a level
51735174
((string< pfx cpfx)

0 commit comments

Comments
 (0)