Код: Выделить всё
*This is line 1
*This is line 2
*This is line 3
Согласно https: //www.baeldung.com/jsoup-line-breaks#:~:t ... ty%2Dprint, я отключаю красивую печать, чтобы символы новой строки не отображались заменено пробелом.
Однако, когда я пытаюсь запустить метод ниже:
Код: Выделить всё
private void printTextbox(String htmlStr){
final Document doc = Jsoup.parse(htmlStr, "UTF-8");
doc.outputSettings().prettyPrint(false);
System.out.println(doc.select("#textbox").val());
}
Код: Выделить всё
*This is line 1*This is line 2*This is line 3
Подробнее здесь: https://stackoverflow.com/questions/787 ... sing-jsoup