我有一些像这样的段落:
"这是第一段.r\r \n \n这是第二个在\n \n \n \n \n \n之后有很多新行的那个和最后一段.\n\r \n"
我想删除新行并用<p>标记包装每个段落.我期待输出如下:
<p>This is the first para.</p>
<p>This is the second one with lot of new line after</p>
<p>And the last para.</p>
Run Code Online (Sandbox Code Playgroud)