Freemarker template generation typesetting indentation problem

When using Freemarker as a template, the generated target files (HTML or xml or other types of files) often have problems with typographical disorder.

Mainly: obviously there are not so many placeholders or indents, but the generated files have corresponding indents.

Similar to the following figure:

Insert picture description here
This is caused by the indentation in front of Freemarker's <#if> tag.

The solution is to write the corresponding <#if test=””> and other tag top grids in the Freemarker template, and do not use indentation. The basic format is as follows:
Insert picture description here
Original link: " Freemarker template generation typesetting indentation problem "

Fine SpringBoot 2.x video tutorial

"Spring Boot 2.x Video Tutorial Family Bucket" , a boutique Spring Boot 2.x video tutorial, to create the most complete set of Spring Boot 2.x video tutorials.


New Vision of Procedure

The public account " New Vision of Program ", a platform that allows you to simultaneously improve your soft power and hard technology

WeChat Official Account: New Vision of Program

Guess you like

Origin blog.csdn.net/wo541075754/article/details/107249746