diff --git a/.claude/skills/skd-compile/scripts/skd-compile.ps1 b/.claude/skills/skd-compile/scripts/skd-compile.ps1 index c55e598b..fd77ceb4 100644 --- a/.claude/skills/skd-compile/scripts/skd-compile.ps1 +++ b/.claude/skills/skd-compile/scripts/skd-compile.ps1 @@ -1,4 +1,4 @@ -# skd-compile v1.7 — Compile 1C DCS from JSON +# skd-compile v1.8 — Compile 1C DCS from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$DefinitionFile, @@ -1231,12 +1231,6 @@ function Emit-AreaTemplateDSL { $w = if ($c -lt $widths.Count) { [double]$widths[$c] } else { 0 } $isVMerged = $vMerge[$r][$c] -eq $true $isHMerged = $hMerge[$r][$c] -eq $true - # Check if this cell starts a vertical merge (next row has "|" in same column) - $startsVMerge = $false - for ($nr = $r + 1; $nr -lt $rows.Count; $nr++) { - if ($vMerge[$nr][$c] -eq $true) { $startsVMerge = $true } else { break } - } - X "`t`t`t`t" if ($isVMerged) { # Vertically merged cell — only appearance with vMerge flag + width @@ -1281,7 +1275,7 @@ function Emit-AreaTemplateDSL { # Appearance $h = if ($r -eq 0) { $minHeight } else { 0 } if (-not $cellExtraItems) { $cellExtraItems = @() } - Emit-CellAppearance $style $w $startsVMerge $false $h $cellExtraItems + Emit-CellAppearance $style $w $false $false $h $cellExtraItems $cellExtraItems = @() } X "`t`t`t`t" diff --git a/.claude/skills/skd-compile/scripts/skd-compile.py b/.claude/skills/skd-compile/scripts/skd-compile.py index c8b6be4a..c415519f 100644 --- a/.claude/skills/skd-compile/scripts/skd-compile.py +++ b/.claude/skills/skd-compile/scripts/skd-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# skd-compile v1.7 — Compile 1C DCS from JSON +# skd-compile v1.8 — Compile 1C DCS from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import json @@ -1041,14 +1041,6 @@ def _emit_area_template_dsl(lines, t): w = float(widths[c]) if c < len(widths) else 0 is_v_merged = v_merge.get(r, {}).get(c, False) is_h_merged = h_merge.get(r, {}).get(c, False) - # Check if this cell starts a vertical merge - starts_v_merge = False - for nr in range(r + 1, len(rows)): - if v_merge.get(nr, {}).get(c, False): - starts_v_merge = True - else: - break - lines.append('\t\t\t\t') if is_v_merged: _emit_cell_appearance(lines, style, w, True) @@ -1086,7 +1078,7 @@ def _emit_area_template_dsl(lines, t): lines.append('\t\t\t\t\t\t') lines.append('\t\t\t\t\t') h = min_height if r == 0 else 0 - _emit_cell_appearance(lines, style, w, starts_v_merge, False, h, cell_extra_items or None) + _emit_cell_appearance(lines, style, w, False, False, h, cell_extra_items or None) lines.append('\t\t\t\t') lines.append('\t\t\t') diff --git a/tests/skills/cases/skd-compile/snapshots/horizontal-merge/Template.xml b/tests/skills/cases/skd-compile/snapshots/horizontal-merge/Template.xml index a232d903..31909b56 100644 --- a/tests/skills/cases/skd-compile/snapshots/horizontal-merge/Template.xml +++ b/tests/skills/cases/skd-compile/snapshots/horizontal-merge/Template.xml @@ -1,2297 +1,2285 @@ - - - - ИсточникДанных1 - Local - - - Основной - - Счет - Счет - - xs:string - - 0 - Variable - - - - - Остаток - Остаток - - xs:decimal - - 15 - 2 - Any - - - - - Пост1 - Пост1 - - xs:decimal - - 15 - 2 - Any - - - - - Пост2 - Пост2 - - xs:decimal - - 15 - 2 - Any - - - - - Пост3 - Пост3 - - xs:decimal - - 15 - 2 - Any - - - - - Выб1 - Выб1 - - xs:decimal - - 15 - 2 - Any - - - - - Выб2 - Выб2 - - xs:decimal - - 15 - 2 - Any - - - - - Итого - Итого - - xs:decimal - - 15 - 2 - Any - - - - ИсточникДанных1 - ВЫБРАТЬ Т.Счет, Т.Остаток, Т.Пост1, Т.Пост2, Т.Пост3, Т.Выб1, Т.Выб2, Т.Итого ИЗ Регистр КАК Т - - - - - Основной - - - ru - Основной - - - - - - - - - - - - - - - - + + + + ИсточникДанных1 + Local + + + Основной + + Счет + Счет + + xs:string + + 0 + Variable + + + + + Остаток + Остаток + + xs:decimal + + 15 + 2 + Any + + + + + Пост1 + Пост1 + + xs:decimal + + 15 + 2 + Any + + + + + Пост2 + Пост2 + + xs:decimal + + 15 + 2 + Any + + + + + Пост3 + Пост3 + + xs:decimal + + 15 + 2 + Any + + + + + Выб1 + Выб1 + + xs:decimal + + 15 + 2 + Any + + + + + Выб2 + Выб2 + + xs:decimal + + 15 + 2 + Any + + + + + Итого + Итого + + xs:decimal + + 15 + 2 + Any + + + + ИсточникДанных1 + ВЫБРАТЬ Т.Счет, Т.Остаток, Т.Пост1, Т.Пост2, Т.Пост3, Т.Выб1, Т.Выб2, Т.Итого ИЗ Регистр КАК Т + + + + + Основной + + + ru + Основной + + + + + + + + + + + + + + + +