Span within a sentence with jade

廉价感情. 提交于 2019-12-24 01:16:18

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!