mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 18:18:55 +01:00
fix: adapt diff highlight for dark theme
This commit is contained in:
parent
7eeb43a83b
commit
1c451fb98a
@ -305,9 +305,9 @@ function RevisionContentDiff({ noteContent, itemContent, itemType }: { noteConte
|
||||
const diff = diffWords(noteContent, itemContent);
|
||||
diffHtml = diff.map(part => {
|
||||
if (part.added) {
|
||||
return `<span style="background:#d4fcbc">${utils.escapeHtml(part.value)}</span>`;
|
||||
return `<span style="background:rgba(100, 200, 100, 0.5)">${utils.escapeHtml(part.value)}</span>`;
|
||||
} else if (part.removed) {
|
||||
return `<span style="background:#ffe6e6;text-decoration:line-through;">${utils.escapeHtml(part.value)}</span>`;
|
||||
return `<span style="background:rgba(255, 100, 100, 0.5);text-decoration:line-through;">${utils.escapeHtml(part.value)}</span>`;
|
||||
} else {
|
||||
return utils.escapeHtml(part.value);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user