How do I wrap span tags in a link_to in slim?

前端 未结 3 2253
闹比i
闹比i 2021-02-20 13:35
li = link_to \'Account\', \'#account\', data: { toggle: \'tab\' }

I need span tags around \'Account\'.

3条回答
  •  暖寄归人
    2021-02-20 14:14

    You can also use a block if you find that you have more complex code inside the link text than just a span tag:

       li = link_to '#account', data: {toggle: 'tab'} do
         span
           = "Account"
    

提交回复
热议问题