开发者

Removing whitespaces in HAML

Is there a way to achieve this in HAML?

<h1>Lorem ip<span class="red">sum</span>&开发者_StackOverflow社区lt;span class="subtitle">dolor</span></h1>

I used this online tool conversor (http://html2haml.heroku.com/)

%h1
  Lorem ip
  %span.red sum
  %span.subtitle dolor

and render this in HTML:

<h1>
  Lorem ip
  <span class='red'>sum</span>
  <span class='subtitle'>dolor</span>
</h1>

I'm trying to remove the whitespace between ip and sum but I can't achieve it.


With this:

%h1<
  Lorem ip
  %span.red> sum
  %span.subtitle dolor

Output looks like this:

<h1>Lorem ip<span class="red">sum</span><span class="subtitle">dolor</span></h1>

HAML Whitespace Removal

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜