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 to help with readability. For example, Mozilla's tutorial written in HTML is easy to read.
Any way to change this:
h3 Arcs
svg(width="320px", height="320px")
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",
stroke="black", fill="green",
stroke-width="2", fill-opacity="0.5")
into something like this:
h3 Arcs
svg(width="320px", height="320px")
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",
stroke="black", fill="green",
stroke-width="2", fill-opacity="0.5")
without triggering an "Unexpected token" error.