'Is there a library for python that allows conversions from markdown to html (including lists)? [closed]

Is there a library for python that allows conversions from markdown to html (including lists)?

I have tried using two libraries: markdown and markdown2 Both of these libraries take this input: enter image description here

###Stepped
The translation will pause if:
- There are no translations for this word
- There are multiple translations for this word

And will ask you how to continue

and convert it to this: enter image description here

<h3>Stepped</h3>

<p>The translation will pause if:
- There are no translations for this word
- There are multiple translations for this word</p>

<p>And will ask you how to continue</p>

I'm looking for functionality similar to https://markdowntohtml.com/



Solution 1:[1]

That's a pretty standard feature.

The problem is likely your input. Add a blank line above the list:

###Stepped
The translation will pause if:

- There are no translations for this word
- There are multiple translations for this word

And will ask you how to continue

I suggest also adding a blank line after the heading, and a space separating the hashes from the heading text:

### Stepped

The translation will pause if:

- There are no translations for this word
- There are multiple translations for this word

And will ask you how to continue

This aids readability of the source code, which was an explicit design consideration:

The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.

The space between ### and Stepped is also required in many specs and implementations, including CommonMark, which is rapidly gaining traction:

The opening sequence of # characters must be followed by spaces or tabs, or by the end of line.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1