Jade: Links inside a paragraph

后端 未结 13 1984
野趣味
野趣味 2020-12-07 17:34

I\'m trying to author a few paragraphs with Jade, but finding it difficult when there are links inside a paragraph.

The best I can come up with, and I\'m wondering

13条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 17:41

    If your links come from a data source you can use:

      ul
        each val in results
          p
            | blah blah 
            a(href="#{val.url}") #{val.name}
            |  more blah
    

    See interpolation

提交回复
热议问题