How to add source code comments in Thymeleaf templates that don't get included in generated HTML?

前端 未结 5 1735
無奈伤痛
無奈伤痛 2021-02-03 18:14

I am using full stack Thymeleaf (spring mvc, security, layout dialect, webflow) in a mid-size web application.

Ok..now that we put so much of code in the html templates

5条回答
  •  独厮守ぢ
    2021-02-03 18:42

    Version 2.1 is released so now you can upgrade your libraries and use comments in your code. With this version developers are able to use parser-level comment blocks:

    
    

    and prototype-only comment blocks:

    hello!
    
    goodbye!
    

    Detailed explanation can be found in the official documentation here: http://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.html#comments-and-blocks

提交回复
热议问题