fix(form-compile): Save Field — не префиксовать ссылку вида N/M без двоеточия

Поле <Save><Field> вида N/M (ссылка на элемент/колонку, напр. 5/0, 5/1) без двоеточия
получало лишний префикс имени реквизита (ДатаОкончанияПериода.5/0) — условие «оставить
как есть» ловило только N/M: с двоеточием (^\d+/\d+:). Форма ОтражениеДокументовВМеждународномУчете.

Фикс: ^\d+/\d+: → ^\d+/\d+ (bare N/M тоже как есть). Корпус 8.3.24: N/M bare 10, N/M: 746
(уже обрабатывался). Декомпилятор симметричен (strip префикса имя. иначе как есть) — не менялся.
Форма → match. Снэпшоты не затронуты (N/M в кейсах не встречается), регресс 43/43 (ps1+py).
Валидация раундтрипом shipped-формы (грузится в 1С; N/M — платформенная ссылка, эмитим verbatim).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-06-12 21:45:49 +03:00
co-authored by Claude Opus 4.8
parent 092f30a663
commit 934462f4d2
3 changed files with 5 additions and 5 deletions
@@ -1,4 +1,4 @@
# form-compile v1.144 — Compile 1C managed form from JSON or object metadata
# form-compile v1.145 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[string]$JsonPath,
@@ -5533,7 +5533,7 @@ function Emit-Attributes {
foreach ($e in @($attr.save)) {
$fld = "$e"
if ([string]::IsNullOrEmpty($fld)) { continue }
if ($fld -ne $attrName -and $fld -notmatch '\.' -and $fld -notmatch '^\d+/\d+:') { $fld = "$attrName.$fld" }
if ($fld -ne $attrName -and $fld -notmatch '\.' -and $fld -notmatch '^\d+/\d+') { $fld = "$attrName.$fld" }
if (-not $saveFields.Contains($fld)) { [void]$saveFields.Add($fld) }
}
}
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# form-compile v1.144 — Compile 1C managed form from JSON or object metadata
# form-compile v1.145 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
import copy
@@ -5296,7 +5296,7 @@ def emit_attributes(lines, attrs, indent, conditional_appearance=None):
fld = str(e)
if not fld:
continue
if fld != attr_name and '.' not in fld and not re.match(r'^\d+/\d+:', fld):
if fld != attr_name and '.' not in fld and not re.match(r'^\d+/\d+', fld):
fld = f'{attr_name}.{fld}'
if fld not in save_fields:
save_fields.append(fld)