@createiq/htmldiff 1.2.0-beta.7 → 1.2.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/HtmlDiff.cjs +11 -0
- package/dist/HtmlDiff.cjs.map +1 -1
- package/dist/HtmlDiff.mjs +11 -0
- package/dist/HtmlDiff.mjs.map +1 -1
- package/package.json +1 -1
- package/src/HtmlDiff.ts +25 -0
- package/test/HtmlDiff.threeWay.spec.ts +40 -0
package/dist/HtmlDiff.cjs
CHANGED
|
@@ -2755,6 +2755,17 @@ var HtmlDiff = class HtmlDiff {
|
|
|
2755
2755
|
curr = next;
|
|
2756
2756
|
continue;
|
|
2757
2757
|
}
|
|
2758
|
+
let allTags = true;
|
|
2759
|
+
for (let i = curr.startInNew; i < curr.endInNew; i++) if (!Utils_default.isTag(wordsForDiffNew[i])) {
|
|
2760
|
+
allTags = false;
|
|
2761
|
+
break;
|
|
2762
|
+
}
|
|
2763
|
+
if (allTags) {
|
|
2764
|
+
yield curr;
|
|
2765
|
+
prev = curr;
|
|
2766
|
+
curr = next;
|
|
2767
|
+
continue;
|
|
2768
|
+
}
|
|
2758
2769
|
let oldDistanceInChars = 0;
|
|
2759
2770
|
for (let i = prev.endInOld; i < next.startInOld; i++) oldDistanceInChars += wordsForDiffOld[i].length;
|
|
2760
2771
|
let newDistanceInChars = 0;
|