Html 省略周围环境<;p>;由HAML生成

Html 省略周围环境<;p>;由HAML生成,html,haml,markdown,Html,Haml,Markdown,已获得以下HAML代码,并结合降价: %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

已获得以下HAML代码,并结合降价:

%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看起来像(省略周围的
标记):


不要再说大话了。缩写词已经够多了。
我们其他人的项目管理。

创建HTML的HAML/Markdown是什么?

只使用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标签。根据本文,这是通过使用4种不同的降价处理器中的一种来实现的。我猜结果可能会因您使用的段落不同而有所不同。

如果您有多个段落块,该怎么办。你想把它们全部删除吗?我只有一段了block@cole-约翰逊:谢谢,我该如何将正则表达式与HAML和Markdown一起使用?你不会吧,你永远都不想用正则表达式来实现这个目的。Tack@froderik,是的,我希望转到“标记内容的Markdown;页面布局的HAML”。我想我使用的是
rdisont
gem.m我认为haml也可以很好地用于内容,而不是将两者混合使用。如果是erb,我会一直和你在一起。
%h2.slogan.align-center
  No more big words. Enough of the abbreviations.
  %br/
  %strong Project management for the rest of us.