mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-28 05:59:41 +03:00
fix(meta-compile): default bare String to String(10), fix SKILL.md examples
Bare `String` type (without length qualifier) now defaults to String(10) instead of String(0) — matching 1C Designer behavior. String(0) means unlimited length (NTEXT in SQL), which is rarely intended. Also fixes SKILL.md: removes misleading `"synonym": "авто"` from JSON example, clarifies synonym auto-generation from CamelCase name. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c0255c71d0
commit
730daf1089
@@ -239,7 +239,7 @@ function Emit-TypeContent {
|
||||
|
||||
# String or String(N)
|
||||
if ($typeStr -match '^String(\((\d+)\))?$') {
|
||||
$len = if ($Matches[2]) { $Matches[2] } else { "0" }
|
||||
$len = if ($Matches[2]) { $Matches[2] } else { "10" }
|
||||
X "$indent<v8:Type>xs:string</v8:Type>"
|
||||
X "$indent<v8:StringQualifiers>"
|
||||
X "$indent`t<v8:Length>$len</v8:Length>"
|
||||
|
||||
@@ -244,7 +244,7 @@ def emit_type_content(indent, type_str):
|
||||
# String or String(N)
|
||||
m = re.match(r'^String(\((\d+)\))?$', type_str)
|
||||
if m:
|
||||
length = m.group(2) if m.group(2) else '0'
|
||||
length = m.group(2) if m.group(2) else '10'
|
||||
X(f'{indent}<v8:Type>xs:string</v8:Type>')
|
||||
X(f'{indent}<v8:StringQualifiers>')
|
||||
X(f'{indent}\t<v8:Length>{length}</v8:Length>')
|
||||
|
||||
Reference in New Issue
Block a user