mirror of https://gitee.com/answerdev/answer.git
fix(Utils): Remove incorrect handling of the `diffText` method
This commit is contained in:
parent
770c17c936
commit
b2efae39d8
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue