Imrove Imports
This commit is contained in:
@@ -212,7 +212,9 @@ public class PDFImportService {
|
||||
for (String para : paragraphs) {
|
||||
String trimmed = para.trim();
|
||||
if (!trimmed.isEmpty() && !isLikelyHeaderFooter(trimmed)) {
|
||||
htmlContent.append("<p>").append(escapeHtml(trimmed)).append("</p>\n");
|
||||
// Normalize soft line wraps (single newlines from PDF layout) to spaces
|
||||
String normalized = trimmed.replaceAll("[ \t]*\n[ \t]*", " ").replaceAll(" {2,}", " ").trim();
|
||||
htmlContent.append("<p>").append(escapeHtml(normalized)).append("</p>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user