Skip to content

Commit

Permalink
Don't generate trailing spaces in minetest.conf.example
Browse files Browse the repository at this point in the history
If the default value of a setting was empty,
it previously generated a trailing space.
  • Loading branch information
est31 committed Feb 27, 2016
1 parent e9cd010 commit e81753b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion builtin/mainmenu/dlg_settings_advanced.lua
Expand Up @@ -706,7 +706,11 @@ local function create_minetest_conf_example()
result = result .. " possible values: " .. entry.possible:gsub(",", ", ")
end
result = result .. "\n"
result = result .. "# " .. entry.name .. " = ".. entry.default .. "\n\n"
local append = ""
if entry.default ~= "" then
append = " " .. entry.default
end
result = result .. "# " .. entry.name .. " =" .. append .. "\n\n"
end
end
return result
Expand Down

0 comments on commit e81753b

Please sign in to comment.