-Fix bug in webui causing artifical sentence breaks at text editor page boundaries

This commit is contained in:
remsky 2025-02-08 01:32:18 -07:00
parent a0dc870f4a
commit 425c7d0eac

View file

@ -88,8 +88,8 @@ export default class TextEditor {
this.updatePageDisplay();
}
// Update full text and char count
this.fullText = this.pages.join('\n');
// Update full text and char count - join with space since pages are just for UI
this.fullText = this.pages.join(' ');
this.updateCharCount();
if (this.options.onTextChange) {
@ -170,8 +170,9 @@ export default class TextEditor {
return;
}
this.fullText = text;
const words = text.split(/\s+/);
// Store original text to preserve natural line breaks
this.fullText = text.trim();
const words = text.trim().split(/\s+/);
this.pages = [];
let currentPage = '';