社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

是否有python库允许从标记转换为html(包括列表)?[闭门]

TheInfiniteWin2 • 3 年前 • 1406 次点击  

是否有python库允许从标记转换为html(包括列表)?

我试过使用两个库:markdown和markdown2 这两个库都接受以下输入: 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

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

我正在寻找类似的功能 https://markdowntohtml.com/

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/129857
 
1406 次点击  
文章 [ 1 ]  |  最新文章 3 年前
Chris
Reply   •   1 楼
Chris    3 年前

这是一个相当标准的功能。

问题可能在于你的投入。在列表上方添加一个空行:

###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

这有助于源代码的可读性,而源代码是 explicit design consideration :

标记格式语法的首要设计目标是使其尽可能可读。其想法是,标记格式的文档应该可以按原样以纯文本的形式发布,而不会看起来像是被标记了标签或格式说明。

之间的空间 ### Stepped 在许多规范和实施中也需要, including CommonMark ,它正在迅速获得吸引力:

开头的顺序 # 字符后面必须跟空格或制表符,或在行尾。