fix(Utils): Remove incorrect handling of the `diffText` method

This commit is contained in:
haitaoo 2023-03-20 18:36:09 +08:00
parent 770c17c936
commit b2efae39d8
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ function diffText(newText: string, oldText?: string): string {
}
if (typeof oldText !== 'string') {
return escapeHtml(newText?.replace(/\n/gi, '<br>'));
return escapeHtml(newText);
}
const diff = Diff.diffChars(escapeHtml(oldText), escapeHtml(newText));
const result = diff.map((part) => {