Multiple Lines for Long Attribute Value in Jade / Pug

后端 未结 6 851
遥遥无期
遥遥无期 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 12:43

    You can do it by closing the string at the line-break, adding a '+', and then opening a new string on the continuation line.

    Here's an example:

    path(d="M10 315 L 110 215 A 30 50 0 0 1 162.55 162.45 L 172.55" +
           " 152.45 A 30 50 -45 0 1 215.1 109.9 L 315 10",
         foo="etc",
         ...
    

提交回复
热议问题