Showdown: Alternate numbering methods when using nested ordered lists

Created on 20 Nov 2017  路  2Comments  路  Source: showdownjs/showdown

Imagine you start with markdown defining two lists: one ordered, and another not.

1. Hello.
1. World.
    1. This is nested.
        1. And this.
        1. And another.
    1. And this one.

- Hello.
- World.
    - This is nested.
        - And this.
        - And another.
    - And this one.

When this markdown is rendered into HTML using showdownjs, the unordered list alternates the type of bullets used in the HTML, but the ordered list always uses the same numbering method in the nested ordered lists that it used in the base ordered list.

I would like you to consider adding an option that would change this behaviour such that the first level of rendered numbering is numeric (1., 2., etc.), the second is alphabetic (e.g. a), b), etc.), and the third is roman (i., ii., iii., etc.), then cycling back to numeric again, and so on. Without this option, nested ordered lists don't render as nicely as they could/should.

help wanted

Most helpful comment

You can easily style lists with css. see this example fiddle

ol>li>ol {list-style-type: upper-roman;}
ol>li>ol>li>ol {list-style-type: lower-alpha;}

All 2 comments

You can easily style lists with css. see this example fiddle

ol>li>ol {list-style-type: upper-roman;}
ol>li>ol>li>ol {list-style-type: lower-alpha;}

Thanks @tivie, that's helpful. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JerryYangJin picture JerryYangJin  路  7Comments

thisconnect picture thisconnect  路  4Comments

DesignResponds picture DesignResponds  路  3Comments

LeahPike picture LeahPike  路  5Comments

buremba picture buremba  路  4Comments