Skip to content

Commit

Permalink
Merge pull request #100 from cosmicexplorer/fix/line-numbering-loop
Browse files Browse the repository at this point in the history
fix cleanup-list-numbers infinite loop
  • Loading branch information
syohex committed Feb 19, 2016
2 parents acd2c4c + 6c44b03 commit 3e88d58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -5166,8 +5166,9 @@ a list."
(setq cpfx (match-string-no-properties 1))
(cond
((string= cpfx pfx)
(replace-match
(concat pfx (number-to-string (setq idx (1+ idx))) ". "))
(save-excursion
(replace-match
(concat pfx (number-to-string (setq idx (1+ idx))) ". ")))
(setq sep nil))
;; indented a level
((string< pfx cpfx)
Expand Down

0 comments on commit 3e88d58

Please sign in to comment.