是否有一个用于python的库,允许将标记转换为html (包括列表)?
我尝试使用两个库: markdown和markdown2,这两个库都接受这个输入:

###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并将其转换为:

<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>我正在寻找类似于https://markdowntohtml.com/的功能
发布于 2022-03-24 18:19:01
这是一个相当标准的特性。
问题很可能是你的意见。在列表的上方添加一个空行:
###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我还建议在标题之后添加一个空行,并在标题文本之后添加一个分隔散列和标题文本的空格:
### 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这有助于源代码的可读性,源代码是一个显式设计考虑
Markdown格式语法的重写设计目标是使其尽可能可读性。这样做的想法是,标记格式的文档应该以纯文本的形式发布,而不像用标记或格式说明进行标记。
###和Stepped之间的空间在许多规范和实现( 包括CommonMark )中也是必需的,它正在迅速获得支持:
#字符的开头序列必须后面跟着空格或制表符,或行尾。
https://stackoverflow.com/questions/71607550
复制相似问题