I’d like to see a feature to renumber ordered lists.
I recognize it doesn’t matter when rendered, but this would be useful for exporting to non-markdown tools, as well as making it easier to manage when editing a list.
Currently, we can use any number when inserting an item, and that (mostly) works, but it would be very nice to then be able to have an option to renumber the whole list.
At this point, I’d like to select the list and use a hotkey/button/menu item to make it:
Hi I edited your post to put the markdown lists in code blocks. Discord is also markdown based so both lists rendered the same…
I like this idea, I think it could probably be wrapped up in a generic auto format function. For example you could select a block of markdown, right click and autoformat that selection. It would hopefully work for lists, tables, generic whitespace.
Thanks! That’s what I get for not previewing my post.
I like that approach. I certainly wouldn’t want to make this a default auto-format. I imagine that would break a lot of workflows.
I give a hearty +1. I would truly love to see this implemented.
Just a friendly reminder: markdown does not care about the numbers. e.g.
both render the same. The preview window will show it correctly.
However, I do understand that you want to have a correct numering in the source as well. Although I believe this is not in the scope of this project. Maybe someone can create a plugin for that.
There's a plugin demo on how to retrieve the selected text, apply some transformation and insert back the text: https://github.com/laurent22/joplin/blob/dev/packages/app-cli/tests/support/plugins/selected_text/src/index.ts
The same logic could be applied to the currently selected list items.