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'):