.
This commit is contained in:
@@ -154,13 +154,13 @@ public class ResearchPdfService {
|
|||||||
document.add(date);
|
document.add(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ИСПРАВЛЕНО: Корректное регулярное выражение для очистки
|
|
||||||
private String cleanContent(String rawContent) {
|
private String cleanContent(String rawContent) {
|
||||||
if (rawContent == null) {
|
if (rawContent == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
// Удаляем теги типа и другие похожие артефакты
|
// Нормализуем переносы строк, избегая некорректных regex-замен
|
||||||
return rawContent.replaceAll("\\", "").trim();
|
String normalized = rawContent.replace("\r\n", "\n").replace("\r", "\n");
|
||||||
|
return normalized.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addMainReport(Document document, DeepResearchResponse researchResponse) throws DocumentException {
|
private void addMainReport(Document document, DeepResearchResponse researchResponse) throws DocumentException {
|
||||||
|
|||||||
Reference in New Issue
Block a user