Reputation: 14048
I have a minor detail question regarding jade templates
I'm seeing the following template:
p(data-ng-show="submitting")
i.icon-cog.icon-spin
| Authenticating...
being converted to this HTML
<p data-ng-show="submitting"><i class="icon-cog icon-spin"></i>Authenticating...</p>
Note the single space before "Authenticating..." is not carried over into the compiled HTML. Is the only solution here to use to force a white space?
Upvotes: 3
Views: 2313
Reputation: 41440
That's how Jade is supposed to work, and I know, it's veeery bad having to deal with such a thing.
You can do this:
p(data-ng-show="submitting")
i.icon-cog.icon-spin
| Authenticating...
which I think is somewhat tricky.
Another option is to print an whitespace HTML entity, as already suggested by @brnrd:
p(data-ng-show="submitting")
i.icon-cog.icon-spin
| Authenticating...
Yet another option, but very bad in my opinion (or not that much if you use i18n), is:
p(data-ng-show="submitting")
i.icon-cog.icon-spin
= " Authenticating..."
Upvotes: 6
Reputation: 3486
Just add a white space character :
As :
p(data-ng-show="submitting")
i.icon-cog.icon-spin
| Authenticating...
It does the trick.
Upvotes: 2