如何使用 slim 模板语言在段落中间放置超链接?
如何用 slim 模板语言编写以下内容?
<p>Join the <a href="">Google group</a> and let us know what you think, or what other features you’d like to see.</p>
我尝试了以下方法:
p
' Join the
a href="" Google Group
' and let us know what you think, or what other features you’d like to see
但这不起作用,因为“组”和“和”一词之间没有空格。
How do you write the following in the slim templating language?
<p>Join the <a href="">Google group</a> and let us know what you think, or what other features you’d like to see.</p>
I tried the following:
p
' Join the
a href="" Google Group
' and let us know what you think, or what other features you’d like to see
But that doesn't work because the words 'Group' and 'and' do not have whitespace between them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显然你可以在引用后添加额外的空格:
Apparently you can add extra spaces after the quote:
。
Rails 标签助手只是方法,因此您可以将该逻辑应用于视图内的其他方法
You can do
Rails tag helpers are just methods, so you can apply that logic to other methods inside views.