我使用了html2haml.heroku.com,它将一些普通的字符串转换成了以下内容:
A normal sentence is here
= succeed '.' do
%strong and it is cut off randomly by this succeed
succeed
调用看起来是不必要的。这只是从html转换为haml的产物吗?
我使用了html2haml.heroku.com,它将一些普通的字符串转换成了以下内容:
A normal sentence is here
= succeed '.' do
%strong and it is cut off randomly by this succeed
succeed
调用看起来是不必要的。这只是从html转换为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>
.
而且,在内联元素中,空格很重要 - 请参考我在这个问题中的(晚了一点)回答。
<b>piece</b>meal
,那么调用succeed
将防止“piece”和“meal”之间有空格。 - Clucking Turtle