【发布时间】:2013-04-30 02:21:12
【问题描述】:
我使用了 html2haml.heroku.com,它把一些普通的字符串变成了以下内容:
A normal sentence is here
= succeed '.' do
%strong and it is cut off randomly by this succeed
succeed 调用似乎没有必要。这只是从html到haml转换的一个神器吗?
【问题讨论】:
标签: haml
我使用了 html2haml.heroku.com,它把一些普通的字符串变成了以下内容:
A normal sentence is here
= succeed '.' do
%strong and it is cut off randomly by this succeed
succeed 调用似乎没有必要。这只是从html到haml转换的一个神器吗?
【问题讨论】:
标签: haml
如果你尝试
A normal sentence is here
= succeed '.' do
%strong and it is cut off randomly by this succeed
并生成HTML,输出将是这样的:
A normal sentence is here
<strong>and it is cut off randomly by this succeed</strong>.
但是,如果你尝试类似
A normal sentence is here
%strong and it is cut off randomly by this succeed
.
你会得到这样的输出:
A normal sentence is here
<strong>and it is cut off randomly by this succeed</strong>
.
并且空白在行内元素中很重要 - 请参阅我在this question中的(迟到的)答案
【讨论】:
<b>piece</b>meal,那么调用succeed 将防止“piece”和“meal”之间出现空格