@abaplint/runtime 2.5.78 → 2.5.79

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.
@@ -5,6 +5,7 @@ const _parse_1 = require("../operators/_parse");
5
5
  const throw_error_1 = require("../throw_error");
6
6
  const field_symbol_1 = require("./field_symbol");
7
7
  const structure_1 = require("./structure");
8
+ const TRIMREGEX = / *$/;
8
9
  class Character {
9
10
  constructor(length, extra) {
10
11
  this.constant = false;
@@ -73,7 +74,12 @@ class Character {
73
74
  return this.value;
74
75
  }
75
76
  getTrimEnd() {
76
- return this.value.replace(/ *$/, "");
77
+ if (this.value.endsWith(" ") === true) {
78
+ return this.value.replace(TRIMREGEX, "");
79
+ }
80
+ else {
81
+ return this.value;
82
+ }
77
83
  }
78
84
  getOffset(input) {
79
85
  let offset = input === null || input === void 0 ? void 0 : input.offset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.5.78",
3
+ "version": "2.5.79",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",