SLIM在多行开头添加空间

时间:2016-08-14 09:37:29

标签: ruby-on-rails slim-lang

我正在尝试在我的苗条模板的开头添加一个空格,因为链接我不得不打破文本,我不能为我的生活工作这个

.mdl-cell.mdl-cell--4-col-phone.mdl-cell--8-col-tablet.mdl-cell--12-col-desktop
  | Don't have an account?
  = link_to 'Create one here.', sign_up_path

4 个答案:

答案 0 :(得分:13)

经过深入研究后发现,使用from twilio.rest import TwilioRestClient # Get these credentials from http://twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" client = TwilioRestClient(account_sid, auth_token) # Make the call call = client.calls.create(to="+14085551234", # Any phone number from_="+12125551234", # Must be a valid Twilio number url="http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient") # Just plays hold music 的方法很简单,所以新代码就是在第一行末尾强制空格

>

答案 1 :(得分:9)

带有简单的引用'苗条增添空间

.mdl-cell.mdl-cell--4-col-phone.mdl-cell--8-col-tablet.mdl-cell--12-col-desktop
  | Don't have an account?
  '
  = link_to 'Create one here.', sign_up_path

答案 2 :(得分:3)

您可以使用 在html元素之间添加空格:

.mdl-cell.mdl-cell--4-col-phone.mdl-cell--8-col-tablet.mdl-cell--12-col-desktop
| Don't have an account? 
= link_to 'Create one here.', sign_up_path

答案 3 :(得分:1)

如果| Don't have an account?之后有空格,则会受到尊重。也许您的文本编辑器设置为删除所有尾随空格。

如果是这样,那么最干净的方法就是使用| Don't have an account?