hackmdio / codimd

CodiMD - Realtime collaborative markdown notes on all platforms.
https://hackmd.io/c/codimd-documentation
GNU Affero General Public License v3.0
9.27k stars 1.06k forks source link

Handling of nested ordered list #414

Open glenndavy opened 7 years ago

glenndavy commented 7 years ago

Hi

First to everyone who's contributed to this code, or pays for/assists with the hosting - thanks! its an awesome tool.

So,

If I'm using the editor and I start a list like so:

1. An Item

then hit return, I get (as expected):

1. An Item
2.

But, if I'm in a nest like so:

1. An Item
2. Another Item
3. 

Then hit tab to indent item, the 3. indents, but doesn't reset to be 1 (effectively 2.1) which would be handy, versus going back to start of line, spacing 4 spaces then replacing the 3 with a 1, from which point the automatic numbering works correctly again within the list.

Similarly, it'd be great if shit tabbing from the last item on a nested list back into its parent list at the correct number.

SISheogorath commented 7 years ago

I would say the renumbering is actually an upstream issue. It should fixed done here: https://github.com/codemirror/CodeMirror/blob/c9ea0ee56ea65c17150b92e50539dafc6515aba4/addon/edit/continuelist.js

SISheogorath commented 7 years ago

Related to https://github.com/hackmdio/hackmd/issues/361