mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-01-10 05:02:40 +01:00
На случай неупорядоченных нумерических индексов
This commit is contained in:
parent
4e81812f4a
commit
006bed7825
@ -253,7 +253,7 @@
|
||||
url="https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/lib/advancedLua.lua",
|
||||
type="Library",
|
||||
preloadFile=true,
|
||||
version=1.34,
|
||||
version=1.35,
|
||||
},
|
||||
{
|
||||
path="/lib/web.lua",
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user