Is it possible to write PHP in jade/pug?

前端 未结 5 2236
挽巷
挽巷 2021-02-09 11:37

Is it possible? If so, how? If its not, do I have to abandon pug if I need to write PHP in my documents? After searching around I didnt find anyone that has adressed this.

5条回答
  •  渐次进展
    2021-02-09 11:57

    You can use the scape syntax with quotes:

    !{''}
    

    For example:

    p Hello !{''}
    

    Will render:

    Hello

    You can test it here: https://pug-demo.herokuapp.com/

提交回复
热议问题