@abaplint/runtime 2.0.48 → 2.0.51

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.
@@ -17,7 +17,7 @@ function replace(input) {
17
17
  wi = input.with;
18
18
  }
19
19
  else if (input.with instanceof types_1.Character) {
20
- wi = input.with.get().trimEnd();
20
+ wi = input.with.get().replace(/ *$/, "");
21
21
  }
22
22
  else if (input.with) {
23
23
  wi = input.with.get();
@@ -5,6 +5,7 @@ export interface IDeleteInternalOptions {
5
5
  index?: INumeric;
6
6
  adjacent?: boolean;
7
7
  comparing?: string[];
8
+ fromValue?: any;
8
9
  from?: any;
9
10
  to?: any;
10
11
  }
@@ -10,6 +10,7 @@ function deleteInternal(target, options) {
10
10
  if ((options === null || options === void 0 ? void 0 : options.index)
11
11
  && (options === null || options === void 0 ? void 0 : options.where) === undefined
12
12
  && (options === null || options === void 0 ? void 0 : options.adjacent) === undefined
13
+ && (options === null || options === void 0 ? void 0 : options.fromValue) === undefined
13
14
  && (options === null || options === void 0 ? void 0 : options.from) === undefined
14
15
  && (options === null || options === void 0 ? void 0 : options.to) === undefined) {
15
16
  target.deleteIndex(options.index.get() - 1);
@@ -44,9 +45,15 @@ function deleteInternal(target, options) {
44
45
  else if ((options === null || options === void 0 ? void 0 : options.index) && options.index.get() === index) {
45
46
  target.deleteIndex(options.index.get() - 1);
46
47
  }
48
+ else if ((options === null || options === void 0 ? void 0 : options.fromValue) && (0, compare_1.eq)(options.fromValue, i)) {
49
+ target.deleteIndex(index);
50
+ }
47
51
  else if ((options === null || options === void 0 ? void 0 : options.from) && options.from.get() <= index + 1) {
48
52
  target.deleteIndex(index);
49
53
  }
54
+ else if ((options === null || options === void 0 ? void 0 : options.to) && options.to.get() <= index + 1) {
55
+ target.deleteIndex(0);
56
+ }
50
57
  prev = i;
51
58
  }
52
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.0.48",
3
+ "version": "2.0.51",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",