From 0425b79a87e6f697178d25659a161d01f0f8157c Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sun, 24 May 2026 17:49:30 +0300 Subject: [PATCH] =?UTF-8?q?fix(skd-compile):=20=D0=BD=D0=B5=20=D1=8D=D0=BC?= =?UTF-8?q?=D0=B8=D1=82=D0=B8=D1=82=D1=8C=20=D0=BF=D1=83=D1=81=D1=82=D1=83?= =?UTF-8?q?=D1=8E=20=20=D0=B4=D0=BB=D1=8F=20cells=20?= =?UTF-8?q?=D0=B1=D0=B5=D0=B7=20=D0=B0=D1=82=D1=80=D0=B8=D0=B1=D1=83=D1=82?= =?UTF-8?q?=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cells со style "none" (без цветов/шрифтов/границ) и без width/merge получали пустой блок . Оригинал платформы для таких cells appearance не пишет вовсе. Добавлен ранний return в Emit-CellAppearance если все атрибуты пустые. PS + Py синхронизированы. Sample30 total: 794 → 782 строки. --- .claude/skills/skd-compile/scripts/skd-compile.ps1 | 9 ++++++++- .claude/skills/skd-compile/scripts/skd-compile.py | 12 +++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.claude/skills/skd-compile/scripts/skd-compile.ps1 b/.claude/skills/skd-compile/scripts/skd-compile.ps1 index c625dfe0..a6dba987 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.93 — Compile 1C DCS from JSON +# skd-compile v1.94 — Compile 1C DCS from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$DefinitionFile, @@ -1628,6 +1628,13 @@ function Emit-ColorValue { function Emit-CellAppearance { param($style, [double]$width = 0, [bool]$vMerge = $false, [bool]$hMerge = $false, [double]$minHeight = 0, $extraItems = @()) $ind = "`t`t`t`t`t`t" + # Если ничего внутри appearance не будет — не эмитим блок вовсе + # (оригинал платформы для cells без атрибутов не пишет ). + $hasContent = $style.bgColor -or $style.textColor -or $style.borders -or $style.font -or ` + $style.hAlign -or $style.vAlign -or $style.wrap -or ` + ($width -gt 0) -or ($minHeight -gt 0) -or $vMerge -or $hMerge -or ` + ($extraItems -and @($extraItems).Count -gt 0) + if (-not $hasContent) { return } X "`t`t`t`t`t" # Background color if ($style.bgColor) { diff --git a/.claude/skills/skd-compile/scripts/skd-compile.py b/.claude/skills/skd-compile/scripts/skd-compile.py index 1859376a..8e28e911 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.93 — Compile 1C DCS from JSON +# skd-compile v1.94 — Compile 1C DCS from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import json @@ -1336,6 +1336,16 @@ def _emit_color_value(lines, color, indent): def _emit_cell_appearance(lines, style, width=0, v_merge=False, h_merge=False, min_height=0, extra_items=None): ind = '\t\t\t\t\t\t' + # Если ничего внутри appearance не будет — не эмитим блок вовсе + # (оригинал платформы для cells без атрибутов не пишет ). + has_content = bool( + style.get('bgColor') or style.get('textColor') or style.get('borders') or + style.get('font') or style.get('hAlign') or style.get('vAlign') or style.get('wrap') or + (width > 0) or (min_height > 0) or v_merge or h_merge or + (extra_items and len(extra_items) > 0) + ) + if not has_content: + return lines.append('\t\t\t\t\t') # Background color if style.get('bgColor'):