@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.cjs
CHANGED
|
@@ -4170,17 +4170,18 @@ var RedlineEngine = class {
|
|
|
4170
4170
|
}
|
|
4171
4171
|
}
|
|
4172
4172
|
}
|
|
4173
|
-
if (insAuthors.size > 0
|
|
4174
|
-
const fullyWithinForeignIns =
|
|
4175
|
-
if ((match_mode === "strict" || match_mode === "first") && fullyWithinForeignIns) {
|
|
4173
|
+
if (insAuthors.size > 0) {
|
|
4174
|
+
const fullyWithinForeignIns = !hasNonForeignRealText;
|
|
4175
|
+
if (!((match_mode === "strict" || match_mode === "first") && fullyWithinForeignIns)) {
|
|
4176
|
+
errors.push(
|
|
4177
|
+
`- 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.`
|
|
4178
|
+
);
|
|
4176
4179
|
continue;
|
|
4177
4180
|
}
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
...commentAuthors
|
|
4181
|
-
]);
|
|
4181
|
+
}
|
|
4182
|
+
if (commentAuthors.size > 0 && match_mode === "all") {
|
|
4182
4183
|
errors.push(
|
|
4183
|
-
`- Edit ${i + 1 + index_offset} Failed:
|
|
4184
|
+
`- 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.`
|
|
4184
4185
|
);
|
|
4185
4186
|
}
|
|
4186
4187
|
}
|