如果您尝试清理一些导入的 HTML 内容,我认为您可以将段落替换为换行符,这样您就可以确保有换行符,并且帖子将得到正确处理。
<p>some text</p><p>some other text</p>
将变成:
\nsome text\n\nsome other text\n
并将呈现为:
some text
some text
如果您尝试清理一些导入的 HTML 内容,我认为您可以将段落替换为换行符,这样您就可以确保有换行符,并且帖子将得到正确处理。
<p>some text</p><p>some other text</p>
将变成:
\nsome text\n\nsome other text\n
并将呈现为:
some text
some text