@adeu/core 1.18.2 → 1.18.4
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/index.cjs +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/engine.ts +23 -18
- package/src/repro.comment-range-modify.test.ts +266 -0
package/dist/index.js
CHANGED
|
@@ -4119,17 +4119,18 @@ var RedlineEngine = class {
|
|
|
4119
4119
|
}
|
|
4120
4120
|
}
|
|
4121
4121
|
}
|
|
4122
|
-
if (insAuthors.size > 0
|
|
4123
|
-
const fullyWithinForeignIns =
|
|
4124
|
-
if ((match_mode === "strict" || match_mode === "first") && fullyWithinForeignIns) {
|
|
4122
|
+
if (insAuthors.size > 0) {
|
|
4123
|
+
const fullyWithinForeignIns = !hasNonForeignRealText;
|
|
4124
|
+
if (!((match_mode === "strict" || match_mode === "first") && fullyWithinForeignIns)) {
|
|
4125
|
+
errors.push(
|
|
4126
|
+
`- Edit ${i + 1 + index_offset} Failed: Modification targets an active insertion from another author (${Array.from(insAuthors).join(", ")}). Accept that change first or scope your edit outside of it.`
|
|
4127
|
+
);
|
|
4125
4128
|
continue;
|
|
4126
4129
|
}
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
...commentAuthors
|
|
4130
|
-
]);
|
|
4130
|
+
}
|
|
4131
|
+
if (commentAuthors.size > 0 && match_mode === "all") {
|
|
4131
4132
|
errors.push(
|
|
4132
|
-
`- Edit ${i + 1 + index_offset} Failed:
|
|
4133
|
+
`- Edit ${i + 1 + index_offset} Failed: match_mode="all" would sweep through a comment range from another author (${Array.from(commentAuthors).join(", ")}). Target the commented text deliberately with match_mode "strict" or "first", or scope your edit outside of it.`
|
|
4133
4134
|
);
|
|
4134
4135
|
}
|
|
4135
4136
|
}
|