@manuscripts/track-changes-plugin 1.5.1-LEAN-2431 → 1.5.2

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
@@ -1217,14 +1217,13 @@ function trackReplaceStep(step, oldState, newTr, attrs, stepResult, currentStepD
1217
1217
  // console.log(JSON.parse(JSON.stringify(changeSteps)))
1218
1218
  function sameThingBackSpaced() {
1219
1219
  /*
1220
- When deleting text with backspace and getting to the point of when a space and a character before the space is deleted
1220
+ When deleting text with backspace and getting to the point of when a space and a character before a deleted piece of text is deleted
1221
1221
  the prosemirror would interpret it as moving the <del> node (this is a tracked deletion) one characted behind.
1222
- It normally results in [delete, delete, insert] set of ChangSteps where 1st delete is for the delete done by
1222
+ It normally results in [delete, delete, insert] set of ChangSteps where the 1st delete is for the delete done by
1223
1223
  the backspace key, the second delete and the insert are a misinterpretation of the moved text. So these last 2 steps have to be caught
1224
1224
  and removed as they are not meaningful.
1225
1225
  */
1226
1226
  if (changeSteps.length == 2 && newSliceContent.size > 0) {
1227
- // or jus thangeSteps.length == 2
1228
1227
  const correspondingDeletion = changeSteps.find(
1229
1228
  // @ts-ignore
1230
1229
  (step) => step.node.text === newSliceContent.content[0].text // @TODO - get more precise proof of match. E.g.: position approximation
@@ -1240,13 +1239,8 @@ function trackReplaceStep(step, oldState, newTr, attrs, stepResult, currentStepD
1240
1239
  const textWasDeleted = !!changeSteps.length;
1241
1240
  if (!backSpacedText && newSliceContent.size > 0) {
1242
1241
  log.info('newSliceContent', newSliceContent);
1243
- //
1244
- // console.log('Sliced Content:')
1245
- // console.log(newSliceContent)
1246
1242
  // Since deleteAndMergeSplitBlockNodes modified the slice to not to contain any merged nodes,
1247
1243
  // the sides should be equal. TODO can they be other than 0?
1248
- // the sides should be equal. TODO can they be other than 0?
1249
- //
1250
1244
  const openStart = slice.openStart !== slice.openEnd ? 0 : slice.openStart;
1251
1245
  const openEnd = slice.openStart !== slice.openEnd ? 0 : slice.openEnd;
1252
1246
  changeSteps.push({
package/dist/index.js CHANGED
@@ -1209,14 +1209,13 @@ function trackReplaceStep(step, oldState, newTr, attrs, stepResult, currentStepD
1209
1209
  // console.log(JSON.parse(JSON.stringify(changeSteps)))
1210
1210
  function sameThingBackSpaced() {
1211
1211
  /*
1212
- When deleting text with backspace and getting to the point of when a space and a character before the space is deleted
1212
+ When deleting text with backspace and getting to the point of when a space and a character before a deleted piece of text is deleted
1213
1213
  the prosemirror would interpret it as moving the <del> node (this is a tracked deletion) one characted behind.
1214
- It normally results in [delete, delete, insert] set of ChangSteps where 1st delete is for the delete done by
1214
+ It normally results in [delete, delete, insert] set of ChangSteps where the 1st delete is for the delete done by
1215
1215
  the backspace key, the second delete and the insert are a misinterpretation of the moved text. So these last 2 steps have to be caught
1216
1216
  and removed as they are not meaningful.
1217
1217
  */
1218
1218
  if (changeSteps.length == 2 && newSliceContent.size > 0) {
1219
- // or jus thangeSteps.length == 2
1220
1219
  const correspondingDeletion = changeSteps.find(
1221
1220
  // @ts-ignore
1222
1221
  (step) => step.node.text === newSliceContent.content[0].text // @TODO - get more precise proof of match. E.g.: position approximation
@@ -1232,13 +1231,8 @@ function trackReplaceStep(step, oldState, newTr, attrs, stepResult, currentStepD
1232
1231
  const textWasDeleted = !!changeSteps.length;
1233
1232
  if (!backSpacedText && newSliceContent.size > 0) {
1234
1233
  log.info('newSliceContent', newSliceContent);
1235
- //
1236
- // console.log('Sliced Content:')
1237
- // console.log(newSliceContent)
1238
1234
  // Since deleteAndMergeSplitBlockNodes modified the slice to not to contain any merged nodes,
1239
1235
  // the sides should be equal. TODO can they be other than 0?
1240
- // the sides should be equal. TODO can they be other than 0?
1241
- //
1242
1236
  const openStart = slice.openStart !== slice.openEnd ? 0 : slice.openStart;
1243
1237
  const openEnd = slice.openStart !== slice.openEnd ? 0 : slice.openEnd;
1244
1238
  changeSteps.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/track-changes-plugin",
3
- "version": "1.5.1-LEAN-2431",
3
+ "version": "1.5.2",
4
4
  "author": "Atypon Systems LLC",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/Atypon-OpenSource/manuscripts-quarterback/tree/main/quarterback-packages/track-changes-plugin",