I wasn't counting HTML's ol tag, that's not fair :)
1. Nissan 2. Tesla 3. BYD
To (god forbid!) remove Tesla, you have to write
1. Nissan 2. BYD
Now generate a diff:
-- 2. Tesla --
-- 3. BYD --
++ 2. BYD --
Ideally the diff should be: -- <some marker> Tesla --Taken from the Markdown Syntax Documentation (https://daringfireball.net/projects/markdown/syntax):
It’s important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:
<ol>
<li>Bird</li>
<li>McHale</li>
<li>Parish</li>
</ol>
If you instead wrote the list in Markdown like this: 1. Bird
1. McHale
1. Parish
...you’d get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don’t have to.
I see 1. 1. 1. like appending commas to every field in a struct declaration or an object constructor. It allows me to go back and arbitrarily move things around.
https://i.imgur.com/VEYqLWE.png
rjp$ diff -u test.md test-notesla.md
--- test.md 2019-04-25 10:58:23.000000000 +0100
+++ test-notesla.md 2019-04-25 10:59:03.000000000 +0100
@@ -1,4 +1,3 @@
1. Nissan
-1. Tesla
1. BYDYou don't actually have to do that, markdown will convert numbered lists to an HTML ordered list, the numbers are just numbered list markers and otherwise ignored: https://hackmd.io/EVPo3hJpQBenp08uy4ZEuA
This behaviour is usually annoying.
reStructuredText supports "#" as a numbered list sigil (as well as various numeral styles e.g. roman or alphabetic). It also supports a custom start, however if the list is explicitly numbered it does not support "holes" e.g. 3 4 5 is fine (and will keep this numbering in the output), 2 3 5 is not.
a) foo
b) bar
c) baz
You have to do that manually. And it won't indent, or re-number automatically, or anything else. I don't know whether Gruber thought "I'll get to that later" or if he isn't the sort of person that ever writes a/b/c/d/e lists, or if he figured it was too hard to adapt the parser for it, but the result is that you can't do that in vanilla Markdown, which means you also can't do that in documents published in Github.
Which is why we've moved our document chain to Asciidoc. :)