Maintain Ordered List Structure with Blocks

What do you need?

The ability to have ordered lists maintain ordering with a block inserted in between. Currently, the ordering is broken for any block inserted in between a set of steps.

Why do you need it?

To describe to users a command to run, or contents of a file, for a particular sequence.

How would it work?

The same way that Markdown handles nested code blocks already.

Example

  1. Do this.
  2. Run this command.
    $ echo test
    
  3. Done

Request also, would like to have whatever in the middle of an ordered list (code block, image, table).

Would also like second level ordered lists, such as 1, 2, 3, 3a, 3b, 3c, 4 etc.

1 Like

Hello!

Unfortunately these kind of changes to the editor are quite core changes, and they affect many systems of ours, both in-house and open source libraries. While I am not promising you of these changes, I can tell you that we’ll try our best.

Apologies about this. I will keep you updated of changes.

I have use several ‘hack’ ways around this:

  • bullets instead of numbers
  • forced manual numbers for short-line lists (that wouldn’t expose the hack with fugly indents)
    Agreed that both of these would be nice to have, but thus far, I have managed to write my way around the need, or to hack it with bullets or manual numbers. YMMV.
1 Like

Update: We are actively working on this

You can now use nested lists on DeveloperHub. This is a beta feature and we are still ironing out some kinks - specially with where the cursor ends up after indenting/outdenting.

You can also continue numbering for ordered lists.

Limitation: Continuing numbering for any other than first-level ordered list after placing content/block is not possible.

image

We have made some fixes to how the cursor ends up :+1:

Let me know if all is working fine and as expected

This may not be the same fix to the same problem, as I was working with UNordered lists and employing multiple levels. Is there a limit (beyond good taste and restraint) on the number of sub-bullets can be nested? I haven’t played with Ordered Lists yet, but I saw a clear limit mentioned on those.https://res.cloudinary.com/developerhub/image/upload/v1621462668/v2_3685/ehjjd8xxs3g1ak3mi4fz.png
I love having the extra depth of formatting available, but could see how it could lead to bad habits.

Hey Randy,

We have not coded specifically any limit to number of sub-bullets. I have just added 16 nested sub-bullets and that’s almost all the horizontal width that a line could take possibly.

The only limitation of nested lists is that once you start a list and get to second level or more, then if you interrupt it with a block, the block would not also be indented, but the real limitation is that you cannot then start the list at the previous level (second or more), it has to start at first level.