@adeu/core 1.18.2 → 1.18.5

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 CHANGED
@@ -4170,17 +4170,18 @@ var RedlineEngine = class {
4170
4170
  }
4171
4171
  }
4172
4172
  }
4173
- if (insAuthors.size > 0 || commentAuthors.size > 0) {
4174
- const fullyWithinForeignIns = insAuthors.size > 0 && !hasNonForeignRealText && commentAuthors.size === 0;
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
- const nestedAuthors = /* @__PURE__ */ new Set([
4179
- ...insAuthors,
4180
- ...commentAuthors
4181
- ]);
4181
+ }
4182
+ if (commentAuthors.size > 0 && match_mode === "all") {
4182
4183
  errors.push(
4183
- `- Edit ${i + 1 + index_offset} Failed: Modification targets an active insertion from another author (${Array.from(nestedAuthors).join(", ")}). Accept that change first or scope your edit outside of it.`
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
  }