From c48f5dec70042c61133717526f9c70d88518a39d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 09:40:56 +0000 Subject: [PATCH 1/2] Initial plan From d4745c65202ec86620f55a56b976d88532e8159a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 09:44:47 +0000 Subject: [PATCH 2/2] Fix variable shadowing in insertTag method by renaming local variable to htmlTag Co-authored-by: jibin2706 <28289448+jibin2706@users.noreply.github.com> --- .gitignore | 1 + src/lib/Diff.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a547bf3..b02a1ff 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ node_modules dist dist-ssr *.local +package-lock.json # Editor directories and files .vscode/* diff --git a/src/lib/Diff.ts b/src/lib/Diff.ts index ec1fdd9..453d1c2 100644 --- a/src/lib/Diff.ts +++ b/src/lib/Diff.ts @@ -146,8 +146,8 @@ class HtmlDiff { } else { if (specialCaseOpeningTagRegex.test(words[0])) { let matchedTag = words[0].match(specialCaseOpeningTagRegex) - let tag = '<' + matchedTag?.[0].replace(/(<|>| )/g, '') + '>' - this.specialTagDiffStack.push(tag) + let htmlTag = '<' + matchedTag?.[0].replace(/(<|>| )/g, '') + '>' + this.specialTagDiffStack.push(htmlTag) specialCaseTagInjection = '' if (tag === 'del') { words.shift()