Almost all markdown viewers/renderers allow for the use of "1. " to denote a numbered list. so instead of
1. item1
2. item2
3. item3
one can write
1. item1
1. item2
1. item3
which will then renders as:
1. item1 2. item2 3. item3
Examples that implement this behavior are sphinx / readthedocs, github, emacs markdown preview, etc. I strongly prefer this option since when people reshuffle their ordered lists, and they don't have a nice editor, they can't make mistakes.
I looked at the code of markdown-insert-list-item
and on line 6040
is the relevant part:
(let* ((old-prefix (match-string 1)) (old-spacing (match-string 2)) (new-prefix (if old-prefix (int-to-string (1+ (string-to-number old-prefix))) "1"))
changing the check just for old-prefix
and adding a check for a configuration option that could be named:markdown-ordered-list-item-prefix-enumeration
(default t
, and when nil
doesn't enumerate, but always inserts "1. ") would be exactly the behavior I am looking for.
Would this be acceptable?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4