fix(skd-compile): drop unneeded " → " — matches Designer style

Конфигуратор внутри текстового контента <query>/<expression> оставляет " сырыми
(проверено на ERP DCS: 1504 raw " против 0 &quot;). Убираем .Replace('"','&quot;')
из esc_xml — теперь round-trip diff против типовых остаётся чистым.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-05-19 16:50:55 +03:00
parent fb67b1b80d
commit 98ebb478ee
5 changed files with 7 additions and 7 deletions
@@ -1,4 +1,4 @@
# skd-compile v1.22 — Compile 1C DCS from JSON
# skd-compile v1.23 — Compile 1C DCS from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[string]$DefinitionFile,
@@ -55,7 +55,7 @@ function X {
function Esc-Xml {
param([string]$s)
return $s.Replace('&','&amp;').Replace('<','&lt;').Replace('>','&gt;').Replace('"','&quot;')
return $s.Replace('&','&amp;').Replace('<','&lt;').Replace('>','&gt;')
}
function Resolve-QueryValue {
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# skd-compile v1.22 — Compile 1C DCS from JSON
# skd-compile v1.23 — Compile 1C DCS from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
import json
@@ -10,7 +10,7 @@ import uuid
def esc_xml(s):
return s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;')
return s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
def fmt_dec(v):
"""Format decimal: 30.0 → '30', 16.625 → '16.625' (match PS1 output)."""
@@ -34,7 +34,7 @@
</dataSet>
<calculatedField>
<dataPath>ИмяРесурса</dataPath>
<expression>&quot;&quot;</expression>
<expression>""</expression>
<title xsi:type="v8:LocalStringType">
<v8:item>
<v8:lang>ru</v8:lang>
@@ -42,7 +42,7 @@
</dataSet>
<calculatedField>
<dataPath>ИмяРесурса</dataPath>
<expression>&quot;&quot;</expression>
<expression>""</expression>
<title xsi:type="v8:LocalStringType">
<v8:item>
<v8:lang>ru</v8:lang>
@@ -34,7 +34,7 @@
</dataSet>
<calculatedField>
<dataPath>ИмяРесурса</dataPath>
<expression>&quot;&quot;</expression>
<expression>""</expression>
<title xsi:type="v8:LocalStringType">
<v8:item>
<v8:lang>ru</v8:lang>