Skip to content

Commit

Permalink
Use innerHtml for diff-view
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Jan 16, 2025
1 parent 99edf41 commit 784d4f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/diffHTML.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export function getDiff(oldHtml: string, newHtml: string): string {
const parser = new DOMParser();
const parsedDiff = parser.parseFromString(unifiedDiff, "text/html");
parsedDiff.querySelectorAll("del.diffmod").forEach((el) => el.remove());
return parsedDiff.body.outerHTML;
return parsedDiff.body.innerHTML;
}

export function diffHTML(oldHtml: string, newHtml: string) {
Expand Down

0 comments on commit 784d4f4

Please sign in to comment.