in my company we work on different projects with Thymeleaf and we have designers who come on a later stage of the project in order to make the website sexy. They usually play around with the css and the html structure and the most common question I get asked is "Where is this html snippet coming from?". The what I usually do is try to look it up in which .html file it resides and because we sometimes have lots of imported fragments and snippets it is time consuming to find it.
So i thought to myself - wouldn't it be nice if there was a special property and when this property is set at the end of every html fragment I'd see in a comment the name of the view that produced this html snippet. Something like this:
<div> some div content here.
<! -- it comes from myproduct.html --> </div>
of course adding that information in the snippet would do the trick but I don't want to go through all the 250 .html files and add it. I was asking if there's a way to extend Thymeleaf in such a way that it would happen automatically - perhaps by adding an IPostProcessor or something else.