Changing ordered lists?

When creating markdown files, markdown has the ability to create numbered lists as in; 1,2,3,4 etc. Although is it possible, that when creating the list and an item such as 3 is removed, making 4 number 3 etc; among other possibilities ?

The list numbers are insignificant in Markdown, so you can make them all 1 and they’ll render as 1, 2, 3, etc. However the list marker is significant, so you can do something like this to skip number 3:

1. Item One
2. Item Two
4) Item Four
1 Like

What I meant was; if I have a numbered list;1,2,3,4,5 and I remove 3 and 5, automatically the markdown file would be updated to make 4 to 3 and 5 to four.

In that case you would need to manually update (or use an external tool) to update the numbers since CommonMark doesn’t format the source, just the rendered output.

Some kind of linter to prettify the Markdown source might be what you’re after. Have a look at this post in the Style Guide topic for one example.

1 Like

You can use cmark, which can both read and write commonmark
(cmark -t commonmark). However, this may result in other
unintended changes to the commonmark source.

1 Like

What would this be called which I’m after. I would think it is like macros; you can define a macro which does or modifies the markdown file automatically.