省略从HAML生成的周围<p> </p>

时间:2012-09-14 00:57:20

标签: html haml markdown

获得以下HAML代码,结合Markdown:

%h2.slogan.align-center
  :markdown
    No more big words. Enough of the abbreviations.  
    **Project management for the rest of us.**

哪个生成HTML:

<h2 class='slogan align-center'>
  <p>No more big words. Enough of the abbreviations.<br/>
  <strong>Project management for the rest of us.</strong></p>
</h2>

我希望HTML看起来像(省略周围的<p>标签):

<h2 class='slogan align-center'>
  No more big words. Enough of the abbreviations.<br/>
  <strong>Project management for the rest of us.</strong>
</h2>

创建该HTML的HAML / Markdown是什么?

1 个答案:

答案 0 :(得分:3)

只有haml很容易做到:

%h2.slogan.align-center
  No more big words. Enough of the abbreviations.
  %br/
  %strong Project management for the rest of us.

似乎haml的markdown插件添加了p标签。根据{{​​3}},这是通过使用4种不同的降价处理器之一来实现的。我猜结果可能会因您使用的是哪个而有所不同。