Multiple Lines for Long Attribute Value in Jade / Pug

后端 未结 6 838
遥遥无期
遥遥无期 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 also had a string as attribute value. I am using react

     input(
       ...props
       label="Contrary to popular belief, Lorem Ipsum is simply random text. \
          It has roots in a piece of classical Latin literature from 45 BC, \ 
          making it over 2000 years old."
    )
    

    in your case...

    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",
    

    Note that there is a space before the backslash

提交回复
热议问题