Skip to content

Commit cd637bb

Browse files
authored
Merge pull request #9 from ankitaggarwalmagicedtech/patch-1
2 parents 8b244e1 + 5546fa9 commit cd637bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Diff.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ class HtmlDiff {
126126
this.content.push(text);
127127
} else {
128128
if (specialCaseOpeningTagRegex.test(words[0])) {
129-
this.specialTagDiffStack.push(words[0]);
129+
let matchedTag = words[0].match(specialCaseOpeningTagRegex);
130+
matchedTag = '<' + matchedTag[0].replace(/(<|>| )/g, '') + '>';
131+
this.specialTagDiffStack.push(matchedTag);
130132
specialCaseTagInjection = '<ins class="mod">';
131133
if (tag === 'del') {
132134
words.shift();

0 commit comments

Comments
 (0)