5 t
= string.gsub(t
, "\n%s*#[^\n]+", "\n")
6 t
= string.gsub(t
, "\n%s*;[^\n]+", "\n")
7 t
= string.gsub(t
, "\n+", "\n") --remove multi lines to one line
8 t
= string.gsub(t
, "%[", "\n%[") -- make an tag "\n\n" at every end of a share
9 t
= string.gsub(t
, "$", "\n\n"); -- make sure there is a tag at end of file
13 string.gsub(t
, "%[(.-)%]%s*\n(.-\n)\n", function(sh
, p
)
15 string.gsub(p
, "%s*(.-)%s*=%s*(.-)%s*\n", function(n
,v
)
21 for i
,k
in pairs(tb
) do
23 for n
, v
in pairs(tb
[i
]) do
24 print("\t"..n
.." = "..v
)