在替换文本段落,我打破了我的头试图写/使用现有的降价解析器之一查找和替换减价文档中的每个文本段落,离开一切不变。检测和降价文件
示例输入:
# A First Level Header
## Second Level Header
Now is the time for all good men to come to the aid of their country. This is just a regular paragraph.
The quick brown fox jumped over the lazy dog's back.
### Header 3
> This is a blockquote.
>
> This is the second paragraph in the blockquote.
>
> ## This is an H2 in a blockquote
期望的效果是识别段落和替换它们,例如
# A First Level Header
## Second Level Header
[replaced]
[replaced]
### Header 3
> This is a blockquote.
>
> This is the second paragraph in the blockquote.
>
> ## This is an H2 in a blockquote
现有库如marked
或markdown-it
似乎是不能解析和重新创建减价文档无副作用的。
什么是在降价文档中查找和替换文本段落的最佳方法?
你应该*至少*提供示例性输入和所希望的输出 –
@Thomas更新的。 – Gajus
我可能会稍微得出一个结论,但是一个降价的段落会是以字母开头的任何内容吗? –