diff options
author | est31 <MTest31@outlook.com> | 2016-02-27 05:26:58 +0100 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2016-02-27 05:49:22 +0100 |
commit | e81753b69c42ddacc9e892f3fa283059914edc73 (patch) | |
tree | 7207797517d30489f5548c9831f8f485718702f1 /builtin | |
parent | e9cd01045a8595aec45802d7ae46f1b3e0952932 (diff) | |
download | minetest-e81753b69c42ddacc9e892f3fa283059914edc73.tar.gz minetest-e81753b69c42ddacc9e892f3fa283059914edc73.tar.bz2 minetest-e81753b69c42ddacc9e892f3fa283059914edc73.zip |
Don't generate trailing spaces in minetest.conf.example
If the default value of a setting was empty,
it previously generated a trailing space.
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mainmenu/dlg_settings_advanced.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/mainmenu/dlg_settings_advanced.lua b/builtin/mainmenu/dlg_settings_advanced.lua index 35883f05f..cab9f169e 100644 --- a/builtin/mainmenu/dlg_settings_advanced.lua +++ b/builtin/mainmenu/dlg_settings_advanced.lua @@ -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 |