Skip to content

Commit

Permalink
Merge pull request #2829 from NDLANO/fix-diff-view
Browse files Browse the repository at this point in the history
Use innerHtml for diff-view
  • Loading branch information
gunnarvelle authored Jan 16, 2025
2 parents 99edf41 + 784d4f4 commit 5cac407
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 5cac407

Please sign in to comment.