Skip to content

Commit

Permalink
fix(Utils): Remove incorrect handling of the diffText method
Browse files Browse the repository at this point in the history
  • Loading branch information
haitaoo committed Mar 20, 2023
1 parent 770c17c commit b2efae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/utils/common.ts
Expand Up @@ -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) => {
Expand Down

0 comments on commit b2efae3

Please sign in to comment.