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