SLIM 在多行开头添加 space
SLIM add space at start of multi line
我正在尝试将 space 添加到我的 slim 模板的开头,由于 link,我不得不中断文本,我这辈子都做不到出来
.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
您可以使用
在 html 个元素之间添加 space:
.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
with a simple quote ' the slim add a space
.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
经过更深入的研究发现,苗条的方法是使用 >
所以新代码是,它在第一行末尾强制使用空格
span> Don't have an account?
= link_to 'Create one here.', sign_up_path
如果你在| Don't have an account?
之后有一个space,它会被尊重。也许您的文本编辑器设置为删除所有结尾的白色space.
如果是这样,那么最干净的方法就是简单地使用 | Don't have an account?
.
我正在尝试将 space 添加到我的 slim 模板的开头,由于 link,我不得不中断文本,我这辈子都做不到出来
.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
您可以使用
在 html 个元素之间添加 space:
.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
with a simple quote ' the slim add a space
.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
经过更深入的研究发现,苗条的方法是使用 >
所以新代码是,它在第一行末尾强制使用空格
span> Don't have an account?
= link_to 'Create one here.', sign_up_path
如果你在| Don't have an account?
之后有一个space,它会被尊重。也许您的文本编辑器设置为删除所有结尾的白色space.
如果是这样,那么最干净的方法就是简单地使用 | Don't have an account?
.