I have a need for an ordered list with numbers inside of another ordered list with numbers.
These two approaches didn't work ...
1. Outer list item 1
1. Outer list item 2
1. Inner list item 1
1. Inner list item 2
1. Outer list item 3
1. Outer list item 1
1. Outer list item 2
1. Inner list item 1
2. Inner list item 2
1. Outer list item 3
Those result in letters for the inner list ...
1. Outer list item 1
2. Outer list item 2
a. Inner list item 1
b. Inner list item 2
3. Outer list item 3
I ended up having to trick the MD engine into thinking that my inner list isn't a list but just a series of paragraphs that start with a number by using non-breaking spaces. Here's my workaround ...
1. Outer list item 1
1. Outer list item 2
1. Inner list item 1
2. Inner list item 2
1. Outer list item 3
It loses the nice hanging indent of a normal list in there, but that's ok. I can live with it.
For a live example of the workaround, see the list-within-a-list at the top of :point_right: https://docs.microsoft.com/aspnet/core/blazor/get-started?view=aspnetcore-3.0
Is there a way to achieve what I want with MD that isn't a hack? If not, I think I'll stick with my workaround ... I think the workaround is better than having to stick HTML into the list (i.e., <ol type="1"> ... </ol>).
btw - Before opening this, I did consult the CommonMark docs. I don't see where they show how to do what I'm trying to do. Forgive me and close this if it just isn't something that you can easily answer.
I think this is an issue about theme. Markdown engine simply transforms these into some <ol> and <li> tags. The theme will control what it will display in page by CSS list-style-type Property. So the best solution is to custom CSS style in theme.
However, given your page is published on docs.microsoft.com, it is feasible to custom style for one particular page, to keep the style consistent throughout the site.
Thanks @superyyrrzz!
cc: @scottaddie
@guardrex Sorry there is a critical typo above. Hope it does not confuse you...
Correct: However, given your page is published on docs.microsoft.com, it is NOT feasible to custom style for one particular page. The site should want to keep the style consistent throughout the site.
BTW, if you need further support on this feature, plase post a question in the internal "Docs Support" channel on Teams.
Thanks ... yes ... I understand. I'll let @scottaddie consider the situation and decide what to do next.
Whatever we end up doing, I just hope that we don't end up with:
Right now, it's a little hackish with paragraphs and non-breaking spaces, but it works well enough until they decide how to handle it.
@guardrex I've started a discussion about this in the internal "Docs Support" Teams channel.