Multiple Lines for Long Attribute Value in Jade / Pug

后端 未结 6 834
遥遥无期
遥遥无期 2020-12-28 12:07

How do we write a long attribute value over multiple lines in Jade / Pug?

SVG paths tend to be really long. We want to write an attribute value over multiple lines t

6条回答
  •  自闭症患者
    2020-12-28 13:02

    I have been looking for an answer to this and I believe you can break jade attributes onto multiple lines by skipping the trailing commas.

    Ex.

    aside                                                                            
      a.my-link(                                                            
        href="https://foo.com"                                         
        data-widget-id="1234567abc")                                         
        | Tweets by @foobar
    

    I found this commit message about it: https://github.com/visionmedia/jade/issues/65

提交回复
热议问题