mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-20 01:20:59 +03:00
fix(skd-edit): patch-query with empty replacement (delete substring)
.strip()/.Trim() in batch-splitting was stripping the trailing space of the " => " separator, making " => " (delete) unrecognizable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
e4dcef8c90
commit
940eafb8e4
@@ -1,4 +1,4 @@
|
|||||||
# skd-edit v1.3 — Atomic 1C DCS editor
|
# skd-edit v1.4 — Atomic 1C DCS editor
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory)]
|
[Parameter(Mandatory)]
|
||||||
@@ -1445,6 +1445,8 @@ $corNs = "http://v8.1c.ru/8.1/data-composition-system/core"
|
|||||||
|
|
||||||
if ($Operation -eq "set-query" -or $Operation -eq "set-structure" -or $Operation -eq "add-dataSet") {
|
if ($Operation -eq "set-query" -or $Operation -eq "set-structure" -or $Operation -eq "add-dataSet") {
|
||||||
$values = @($Value)
|
$values = @($Value)
|
||||||
|
} elseif ($Operation -eq "patch-query") {
|
||||||
|
$values = @($Value -split ';;' | Where-Object { $_.Trim() })
|
||||||
} else {
|
} else {
|
||||||
$values = @($Value -split ';;' | ForEach-Object { $_.Trim() } | Where-Object { $_ })
|
$values = @($Value -split ';;' | ForEach-Object { $_.Trim() } | Where-Object { $_ })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# skd-edit v1.3 — Atomic 1C DCS editor (Python port)
|
# skd-edit v1.4 — Atomic 1C DCS editor (Python port)
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
@@ -1252,6 +1252,8 @@ xml_doc = tree.getroot()
|
|||||||
|
|
||||||
if operation in ("set-query", "set-structure", "add-dataSet"):
|
if operation in ("set-query", "set-structure", "add-dataSet"):
|
||||||
values = [value_arg]
|
values = [value_arg]
|
||||||
|
elif operation == "patch-query":
|
||||||
|
values = [v for v in value_arg.split(";;") if v.strip()]
|
||||||
else:
|
else:
|
||||||
values = [v.strip() for v in value_arg.split(";;") if v.strip()]
|
values = [v.strip() for v in value_arg.split(";;") if v.strip()]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user