mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-04-13 09:39:17 +00:00
-Fix bug in webui causing artifical sentence breaks at text editor page boundaries
This commit is contained in:
parent
a0dc870f4a
commit
425c7d0eac
1 changed files with 5 additions and 4 deletions
|
@ -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 = '';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue