Reputation: 1235
There's a couple of issues I'm experiencing when I use the #[]
syntax for HTML tags.
Here's the two issues I'm experiencing:
Using an apostrophe
p.
#[strong John's strong text] is really strong.
Error message:
The end of the string was reached with no closing bracket found.]
Using multiple lines
p.
#[strong This strong text is really really long. This strong
text is really really long. This strong text is really really
long.]
Error message:
The end of the string was reached with no closing bracket found.]
I've tried solving both problems by adding \
but no luck.
Upvotes: 1
Views: 809
Reputation: 8540
According to GitHub issue #1723:
Case 1 was a bug that has been fixed in Pug 2.0.0 (released in 2018).
Case 2 is intentional because "it's really not clear exactly what that would mean in terms of indentation." This is suggested as an alternative:
p
strong.
This strong text is really really long. This strong
text is really really long. This strong text is really really
long.
Upvotes: 0
Reputation: 192
You can replace ' with
'
to get rid of the error. So to answer 1. you could do
#[strong John's strong text] and it should work as expected.
Upvotes: 1
Reputation: 1235
For anybody stumbling on this, I've opened up an issue on Jade's GitHub because it turns out both 1 and 2 are currently not supported.
Link: https://github.com/jadejs/jade/issues/1723
Upvotes: 0