【问题标题】:Parsedown for PHP blockquotes解析 PHP 块引用
【发布时间】:2016-05-18 10:54:11
【问题描述】:

我在一个项目中使用Parsedown。引号有问题:

$text = ">here's a quote <br><br> reply to quote";
echo $Parsedown->text($text);

正在输出

<blockquote>
    <p>
        "here's a quote "
        <br>
        <br>
        " reply to quote"
    </p>
</blockquote>

而我希望块引用在第二个&lt;br&gt; 之后结束,然后将回复作为简单的p。文本应该如何,它是否使用换行符而不是换行符之类的?

【问题讨论】:

  • 只是出于好奇,您可以尝试使用换行符 ($text = "&gt; here's a quote" . PHP_EOL . PHP_EOL . "reply to quote") 吗?

标签: php markdown parsedown


【解决方案1】:

你的字符串应该是:

">here's a quote <br><br>

reply to quote"

在这里查看:http://parsedown.org/demo

【讨论】:

  • 如何将这些新行存储在数据库文本字段中?
猜你喜欢
  • 1970-01-01
  • 2016-03-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-09-30
  • 2017-10-05
  • 2017-07-10
  • 2023-03-14
相关资源
最近更新 更多