Best way to handle data attributes in Slim

前端 未结 4 859
自闭症患者
自闭症患者 2021-02-04 23:26

I was evaluating Slim as a replacement for HAML in a personal project, and it doesn\'t appear to handle HTML5 data attributes as gracefully as

4条回答
  •  情话喂你
    2021-02-04 23:54

    Use the splat operator:

    h1#section-title*{'data-url'=>'test', 'data-id'=>'test'} = @project.name
    

提交回复
热议问题