Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unordered list nested inside an ordered list causes numbers to be incorrect #1015

Open
daltonclaybrook opened this issue Aug 15, 2024 · 4 comments

Comments

@daltonclaybrook
Copy link

daltonclaybrook commented Aug 15, 2024

When using an unordered list as a child of an ordered list element, the HTML that is produced does not preserve the nesting, causing the <ol> and <ul> tags to appear at the same level in the hierarchy. This in turn causes the numbers in the ordered list to be incorrect.

Here's an example demonstrating the issue

You can see that each item is listed with "1." even though they are numbered 1-4 in the markdown.

In the rendered HTML, you can see the <ol> and <ul> tags being rendered at the same level rather than the <ul> tags being nested inside the <ol> tags as expected.
image

@bbcvc
Copy link

bbcvc commented Aug 23, 2024

I'm having the same problem.

@ThomasTrepanier
Copy link

If you add one space to your sub-item, it will indent properly (admittedly with a space on top which I don't think is the default behaviour of MD.
image

@stevegardnersa
Copy link

I have the same problem. Unfortunately I don'y have control of the original markdown doc to add the space as suggested.

@Dan-Wood
Copy link

I had this issue too also without control of the original markdown. Moving to Micromark fixed it unfortunately. I really liked Showdown...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants