Skip to content

Commit e072ca8

Browse files
committed
Code formatting and config fixes after review
1 parent 4767ba5 commit e072ca8

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

lua/themepark/plugins/bbox.lua

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ local function build_layer_config(info)
7575
geometry_field = info.geom_column,
7676
geometry_type = string.upper(info.geom_type),
7777
srid = plugin.themepark.options.srid,
78-
-- simplify = true,
7978
buffer_size = 10,
8079
}
8180

@@ -192,7 +191,7 @@ local function ordered_keys(o)
192191
end
193192
table.sort(keys1)
194193
table.sort(keys2)
195-
for _,v in ipairs(keys2) do
194+
for _, v in ipairs(keys2) do
196195
table.insert(keys1, v)
197196
end
198197
return keys1
@@ -215,23 +214,23 @@ local function dump_toml(o, indent_size, parents)
215214
table.remove(parents)
216215
elseif type(k) == 'number' then
217216
local tag = table.concat(parents, ".")
218-
s = s .. '\n\n' .. indent .. '[[' .. tag ..']]' .. dump_toml(v, indent_size, parents)
217+
s = s .. '\n\n' .. indent .. '[[' .. tag .. ']]' .. dump_toml(v, indent_size, parents)
219218
else
220219
table.insert(parents, k)
221220
indent = string.rep(" ", #parents * indent_size)
222221
local tag = table.concat(parents, ".")
223-
s = s .. '\n\n' .. indent .. '[' .. tag ..']' .. dump_toml(v, indent_size, parents)
222+
s = s .. '\n\n' .. indent .. '[' .. tag .. ']' .. dump_toml(v, indent_size, parents)
224223
table.remove(parents)
225224
end
226225
else
227226
if type(v) == 'string' then
228227
if string.find(v, '"') then
229-
v = '"""'..v..'"""'
228+
v = '"""' ..v.. '"""'
230229
else
231-
v = '"'..v..'"'
230+
v = '"' ..v.. '"'
232231
end
233232
end
234-
s = s .. '\n' .. indent .. k ..' = ' .. dump_toml(v, indent_size, parents)
233+
s = s .. '\n' .. indent .. k .. ' = ' .. dump_toml(v, indent_size, parents)
235234
end
236235
end
237236
return s
@@ -248,12 +247,12 @@ function plugin:write_config(filename, options)
248247
end
249248

250249
local config = {
251-
webserver = { server_addr = '0.0.0.0:8080' },
250+
webserver = { server_addr = '127.0.0.1:8080' },
252251
datasource = {
253252
{
254253
name = 'db',
255254
postgis = {
256-
url = "postgres:///db"
255+
url = "postgres:///db" -- overwrite with env vars
257256
}
258257
}
259258
},

0 commit comments

Comments
 (0)