Open audreytoskin opened 8 years ago
I'm not sure this is really that inconsistent. It works for JavaScript interpolation because JavaScript is mostly whitespace-insensitive. It doesn't work for pug
because pug
is mostly whitespace insensitive. Having said that, we could strip leading whitepsace, which may well be a better UX so I'm not massively against it.
I basically follow the Idiomatic.js styleguide for JavaScript, which partly means I'm used to putting whitespace inside brackets, around the contained terms. So, in Jade, I was tempted to write string interpolation like this:
Which seems to work the way it should, with or without the spaces. However, tag interpolation does not seem to allow spaces. The following line
...should produce
<p><em>blah blah</em></p>
-- but instead it produces<p>em blah blah </p>
Not a major bug, but this seems a little inconsistent to me.