A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix(Utils): Remove incorrect handling of the `diffText` method
haitaoob2efae39d8a4
diff --git a/ui/src/utils/common.ts b/ui/src/utils/common.tsindex ab677826..bd2f61a3 100644--- a/ui/src/utils/common.ts+++ b/ui/src/utils/common.ts@@ -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) => {