@kontur.candy/generator 5.73.1 → 5.73.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -50114,9 +50114,11 @@ class KCLangAntlrVisitor {
50114
50114
  };
50115
50115
  }
50116
50116
  visitConstString(ctx) {
50117
+ const stringLiteralAsIs = ctx.STRING_LITERAL().text;
50118
+ const literalValue = stringLiteralAsIs.startsWith("'") ? stringLiteralAsIs.replace(/^\'|\'$/g, "").replace(/\\'/g, "'") : stringLiteralAsIs.replace(/^\"|\"$/g, "").replace(/\\"/g, '"');
50117
50119
  return {
50118
50120
  type: "string",
50119
- value: ctx.STRING_LITERAL().text.replace(/^\'|\'$/g, "").replace(/^\"|\"$/g, "")
50121
+ value: literalValue
50120
50122
  };
50121
50123
  }
50122
50124
  visitConstDecimal(ctx) {
@@ -69733,7 +69735,7 @@ class KCXmlGeneratorBase {
69733
69735
  return gcf(x => x.eq, ...compiledParts);
69734
69736
  }
69735
69737
  if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaConstExpression) {
69736
- return gcf(x => x.const, `"${expression.value}"`);
69738
+ return gcf(x => x.const, `${JSON.stringify(expression.value)}`);
69737
69739
  }
69738
69740
  if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGtExpression) {
69739
69741
  (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.ensureArrayHasLength)(expression.arguments, 2);
@@ -69761,8 +69763,8 @@ class KCXmlGeneratorBase {
69761
69763
  }
69762
69764
  if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaRegexMatchExpression) {
69763
69765
  const compiledArgument = this.compileExpression(prefix, targetFullPath, expression.argument, deps);
69764
- const preparedPattern = expression.pattern.replace(/"/g, '\\"').replace(/\\/g, "\\\\");
69765
- return gcf(x => x.regexMatch, compiledArgument, `"${preparedPattern}"`);
69766
+ const preparedPattern = JSON.stringify(expression.pattern);
69767
+ return gcf(x => x.regexMatch, compiledArgument, preparedPattern);
69766
69768
  }
69767
69769
  if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaMultiplyExpression) {
69768
69770
  (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.ensureArrayLengthGreaterThenOrEqual)(expression.arguments, 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "5.73.1",
3
+ "version": "5.73.2",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,