ide-assi 0.426.0 → 0.427.0

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.
@@ -235071,7 +235071,11 @@ class IdeDiff extends HTMLElement {
235071
235071
  switch (op) {
235072
235072
  case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
235073
235073
  console.log(diffMatchPatchExports.diff_match_patch.DIFF_INSERT, text);
235074
- const tobeLines = text.split('\n');
235074
+ let tobeLines = text.split('\n');
235075
+ if (tobeLines[tobeLines.length - 1] === '\n') {
235076
+ tobeLines.slice(tobeLines.length - 1, 1);
235077
+ }
235078
+
235075
235079
  for (let i = 0; i < tobeLines.length; i++) {
235076
235080
  // 빈 줄이 아니고, 마지막 줄이면서 줄바꿈이 없는 경우가 아니면 데코레이션
235077
235081
  /**
@@ -235081,7 +235085,7 @@ class IdeDiff extends HTMLElement {
235081
235085
  tobeCursor += tobeLines[i].length + (i < tobeLines.length - 1 ? 1 : 0);
235082
235086
  */
235083
235087
  console.log(tobeCursor);
235084
- tobeLineBuilder.add(tobeCursor, 0, insertedLineDeco);
235088
+ tobeLineBuilder.add(tobeCursor, tobeCursor, insertedLineDeco);
235085
235089
  tobeCursor += tobeLines[i].length + (i < tobeLines.length - 1 ? 1 : 0);
235086
235090
  }
235087
235091
  break;
@@ -235067,7 +235067,11 @@ class IdeDiff extends HTMLElement {
235067
235067
  switch (op) {
235068
235068
  case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
235069
235069
  console.log(diffMatchPatchExports.diff_match_patch.DIFF_INSERT, text);
235070
- const tobeLines = text.split('\n');
235070
+ let tobeLines = text.split('\n');
235071
+ if (tobeLines[tobeLines.length - 1] === '\n') {
235072
+ tobeLines.slice(tobeLines.length - 1, 1);
235073
+ }
235074
+
235071
235075
  for (let i = 0; i < tobeLines.length; i++) {
235072
235076
  // 빈 줄이 아니고, 마지막 줄이면서 줄바꿈이 없는 경우가 아니면 데코레이션
235073
235077
  /**
@@ -235077,7 +235081,7 @@ class IdeDiff extends HTMLElement {
235077
235081
  tobeCursor += tobeLines[i].length + (i < tobeLines.length - 1 ? 1 : 0);
235078
235082
  */
235079
235083
  console.log(tobeCursor);
235080
- tobeLineBuilder.add(tobeCursor, 0, insertedLineDeco);
235084
+ tobeLineBuilder.add(tobeCursor, tobeCursor, insertedLineDeco);
235081
235085
  tobeCursor += tobeLines[i].length + (i < tobeLines.length - 1 ? 1 : 0);
235082
235086
  }
235083
235087
  break;
@@ -279,7 +279,11 @@ export class IdeDiff extends HTMLElement {
279
279
  switch (op) {
280
280
  case diff_match_patch.DIFF_INSERT:
281
281
  console.log(diff_match_patch.DIFF_INSERT, text);
282
- const tobeLines = text.split('\n');
282
+ let tobeLines = text.split('\n');
283
+ if (tobeLines[tobeLines.length - 1] === '\n') {
284
+ tobeLines.slice(tobeLines.length - 1, 1);
285
+ }
286
+
283
287
  for (let i = 0; i < tobeLines.length; i++) {
284
288
  // 빈 줄이 아니고, 마지막 줄이면서 줄바꿈이 없는 경우가 아니면 데코레이션
285
289
  /**
@@ -289,7 +293,7 @@ export class IdeDiff extends HTMLElement {
289
293
  tobeCursor += tobeLines[i].length + (i < tobeLines.length - 1 ? 1 : 0);
290
294
  */
291
295
  console.log(tobeCursor);
292
- tobeLineBuilder.add(tobeCursor, 0, insertedLineDeco);
296
+ tobeLineBuilder.add(tobeCursor, tobeCursor, insertedLineDeco);
293
297
  tobeCursor += tobeLines[i].length + (i < tobeLines.length - 1 ? 1 : 0);
294
298
  }
295
299
  break;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.426.0",
4
+ "version": "0.427.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -279,7 +279,11 @@ export class IdeDiff extends HTMLElement {
279
279
  switch (op) {
280
280
  case diff_match_patch.DIFF_INSERT:
281
281
  console.log(diff_match_patch.DIFF_INSERT, text);
282
- const tobeLines = text.split('\n');
282
+ let tobeLines = text.split('\n');
283
+ if (tobeLines[tobeLines.length - 1] === '\n') {
284
+ tobeLines.slice(tobeLines.length - 1, 1);
285
+ }
286
+
283
287
  for (let i = 0; i < tobeLines.length; i++) {
284
288
  // 빈 줄이 아니고, 마지막 줄이면서 줄바꿈이 없는 경우가 아니면 데코레이션
285
289
  /**
@@ -289,7 +293,7 @@ export class IdeDiff extends HTMLElement {
289
293
  tobeCursor += tobeLines[i].length + (i < tobeLines.length - 1 ? 1 : 0);
290
294
  */
291
295
  console.log(tobeCursor);
292
- tobeLineBuilder.add(tobeCursor, 0, insertedLineDeco);
296
+ tobeLineBuilder.add(tobeCursor, tobeCursor, insertedLineDeco);
293
297
  tobeCursor += tobeLines[i].length + (i < tobeLines.length - 1 ? 1 : 0);
294
298
  }
295
299
  break;