mirror of
https://github.com/iib0011/omni-tools.git
synced 2026-11-21 21:44:43 +03:00
chore: imports updated in compare text
This commit is contained in:
1 parent
ec5ec65149
commit
cec53699ff
1 file changed
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { diffWordsWithSpace, diffChars } from 'diff';
|
||||
import { level } from './types';
|
||||
import { escapeHtml } from 'utils/string';
|
||||
import { escapeMarkup } from 'utils/string';
|
||||
|
||||
const DIFF_FN = {
|
||||
word: diffWordsWithSpace,
|
||||
@@ -16,7 +16,7 @@ export function compareTextsHtml(
|
||||
|
||||
const html = diffs
|
||||
.map((part) => {
|
||||
const val = escapeHtml(part.value).replace(/\n/g, '<br>');
|
||||
const val = escapeMarkup(part.value).replace(/\n/g, '<br>');
|
||||
if (part.added) {
|
||||
return `<span class="diff-added">${val}</span>`;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user