问题
How would I be able to do this with Jade?
<h3 class = "blurb"> how would I <span>do this</span></h3>
I can do pretty much everything but introducing a span mid sentence.
回答1:
this should help you:
h3
how should I
span do this
Your output code will not be exactly what you want, but when it's rendered in html, it should be what you need
回答2:
h3.blur.
how would I <span>do this</span>
OR
h3.blur
| how would I
span do this
Please note that copying above snippet may not work because of the indentation. You need to convert spaces to tabs in sublime or similar editor.
回答3:
The pipe is also optional depending on the context
h3.blurb how would i
span do this
also works
回答4:
May be the proper way to do it is to use pug's tag interpolation:
h3.blur how would I #[span do this]
来源:https://stackoverflow.com/questions/36613138/span-within-a-sentence-with-jade