mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-03-29 20:22:47 +02:00
На случай неупорядоченных нумерических индексов
This commit is contained in:
@@ -285,13 +285,10 @@ function table.serialize(array, prettyLook, indentationWidth, indentUsingTabs, r
|
||||
end
|
||||
|
||||
if keyType == "number" then
|
||||
if not prettyLook then
|
||||
table.insert(result, "[")
|
||||
table.insert(result, key)
|
||||
table.insert(result, "]")
|
||||
|
||||
table.insert(result, equalsSymbol)
|
||||
end
|
||||
table.insert(result, "[")
|
||||
table.insert(result, key)
|
||||
table.insert(result, "]")
|
||||
table.insert(result, equalsSymbol)
|
||||
elseif keyType == "string" then
|
||||
-- Короч, если типа начинается с буковки, а также если это алфавитно-нумерическая поеботня
|
||||
if prettyLook and key:match("^%a") and key:match("^[%w%_]+$") then
|
||||
|
||||
Reference in New Issue
Block a user