@createiq/htmldiff 1.2.0-beta.5 → 1.2.0-beta.6
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 +7 -2
- package/dist/HtmlDiff.cjs.map +1 -1
- package/dist/HtmlDiff.d.cts +1 -1
- package/dist/HtmlDiff.d.mts +1 -1
- package/dist/HtmlDiff.mjs +7 -2
- package/dist/HtmlDiff.mjs.map +1 -1
- package/package.json +1 -1
- package/src/HtmlDiff.ts +14 -2
package/dist/HtmlDiff.cjs
CHANGED
|
@@ -2187,8 +2187,13 @@ var HtmlDiff = class HtmlDiff {
|
|
|
2187
2187
|
this.oldText = oldText;
|
|
2188
2188
|
this.newText = newText;
|
|
2189
2189
|
}
|
|
2190
|
-
static execute(oldText, newText) {
|
|
2191
|
-
|
|
2190
|
+
static execute(oldText, newText, options = {}) {
|
|
2191
|
+
const inner = new HtmlDiff(oldText, newText);
|
|
2192
|
+
if (options.blockExpressions) for (const expr of options.blockExpressions) inner.addBlockExpression(expr);
|
|
2193
|
+
if (options.repeatingWordsAccuracy !== void 0) inner.repeatingWordsAccuracy = options.repeatingWordsAccuracy;
|
|
2194
|
+
if (options.orphanMatchThreshold !== void 0) inner.orphanMatchThreshold = options.orphanMatchThreshold;
|
|
2195
|
+
if (options.ignoreWhitespaceDifferences !== void 0) inner.ignoreWhitespaceDifferences = options.ignoreWhitespaceDifferences;
|
|
2196
|
+
return inner.build();
|
|
2192
2197
|
}
|
|
2193
2198
|
/**
|
|
2194
2199
|
* Analyse a two-way diff and return its raw building blocks: the word
|