mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 03:36:47 -04:00
Merge pull request #195 from infinikiller64/patch-1
Added :gsub("\\\n","\\n") to string serialization
This commit is contained in:
commit
fca62946bf
@ -28,7 +28,7 @@ function serialization.serialize(value, pretty)
|
|||||||
return tostring(v)
|
return tostring(v)
|
||||||
end
|
end
|
||||||
elseif t == "string" then
|
elseif t == "string" then
|
||||||
return string.format("%q", v)
|
return string.format("%q", v):gsub("\\\n","\\n")
|
||||||
elseif t == "table" and pretty and getmetatable(v) and getmetatable(v).__tostring then
|
elseif t == "table" and pretty and getmetatable(v) and getmetatable(v).__tostring then
|
||||||
return tostring(v)
|
return tostring(v)
|
||||||
elseif t == "table" then
|
elseif t == "table" then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user