我使用了html2haml.heroku.com,它将一些普通字符串转换为以下内容:
A normal sentence is here
= succeed '.' do
%strong and it is cut off randomly by this succeed
succeed
来电似乎没必要。这只是从html到haml转换的工件吗?
答案 0 :(得分:16)
如果您尝试
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
中的我(迟到)答案