Open patwork opened 9 years ago
My personal preference is to use
p.one this #[strong is] madness
but I know other people use different ways. I would recommend against using
p.one ...
= " "
| ...
I think the best solution is disallowing string literals like that in code blocks. Do you have any other ideas?
Well... ;) I must say I've always used
= " "
| ...
and propably will use
!= " "
| ...
in my next project (without unnecessary attempt to escape/sanitize this one space). Yes, I know it looks ugly, but it's pure jade, without html tags in text. is harmless, but let's say I need anchor inside text with href, title, rel, etc.
| lorem ipsum
a.some-class(href="/some-page", title="blah blah", rel="nofollow", ......)
| dolor sit amet
I don't see a satisfying solution.
edit: I see you've changed to to jade's #[strong] ;)
With all that said, do you have a recommendation for a whitespace rule?
I was thinking about suggesting != " " over = " ", but that's propably too pedantic and since you're against those type of constructions we can return to this topic after some better solution will come to mind.
not only jade, but they solved it eventually:
I'll consider the options, and I'll see if there's a good solution. For now, enjoy the new rule, RequireStatementInCodeBock :)
yea, about that... https://github.com/rrdelaney/jadelint/issues/13 ;)
So, how to deal with whitespace? Sadly, p.two has best compiled version but is poorly readable in jade.