@abaplint/runtime 2.3.47 → 2.3.48
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/build/src/compare/cp.js
CHANGED
|
@@ -36,6 +36,8 @@ function cp(left, right) {
|
|
|
36
36
|
r = r.replace(/\)/g, "\\)");
|
|
37
37
|
r = r.replace(/\./g, "\\.");
|
|
38
38
|
r = r.replace(/\|/g, "\\|");
|
|
39
|
+
r = r.replace(/\$/g, "\\$");
|
|
40
|
+
r = r.replace(/\^/g, "\\^");
|
|
39
41
|
r = r.replace(/#\*/g, "\\u{002A}");
|
|
40
42
|
r = r.replace(/#\+/g, "\\u{002B}");
|
|
41
43
|
r = r.replace(/\*/g, "[\\s\\S]*");
|
|
@@ -17,8 +17,16 @@ function insertInternal(options) {
|
|
|
17
17
|
const insert = options.data instanceof types_1.Structure ? options.data.get() : { table_line: options.data };
|
|
18
18
|
const compare = (row) => {
|
|
19
19
|
for (const key of (tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.keyFields) || []) {
|
|
20
|
-
if (
|
|
21
|
-
|
|
20
|
+
if (key.includes("-")) {
|
|
21
|
+
const [first, second] = key.split("-");
|
|
22
|
+
if ((0, compare_1.ne)(row[first.toLowerCase()].get()[second.toLowerCase()], insert[first.toLowerCase()].get()[second.toLowerCase()])) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
if ((0, compare_1.ne)(row[key.toLowerCase()], insert[key.toLowerCase()])) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
}
|
|
24
32
|
return true;
|