Let html automatically recognize the newline character '\n' in the string and output the newline

In the css settings of the div where the results are:

white-space: pre-line;

Then the page can successfully recognize '\n' and display it in a new line

Guess you like

Origin blog.csdn.net/dazhanglao/article/details/119565636