LDoc: use string version so trailing 0s don't get trimmed
This commit is contained in:
parent
dbe74dcf08
commit
1540c78959
@ -33,7 +33,7 @@ not_luadoc = true
|
||||
favicon = "https://www.minetest.net/media/icon.svg"
|
||||
readme = ".ldoc/README.md"
|
||||
|
||||
local version = 1.6
|
||||
local version = "1.6"
|
||||
|
||||
file = {
|
||||
"settings.lua",
|
||||
|
@ -46,7 +46,11 @@ for f in to_update:
|
||||
if not version_set:
|
||||
if "=" in replacement and li.startswith(replacement):
|
||||
key = li.split(" = ")[0]
|
||||
li = "{} = {}".format(key, new_version)
|
||||
if replacement.startswith("local"):
|
||||
# use string in LDoc config trailing 0s aren't trimmed
|
||||
li = '{} = "{}"'.format(key, new_version)
|
||||
else:
|
||||
li = "{} = {}".format(key, new_version)
|
||||
version_set = True
|
||||
elif li == replacement:
|
||||
li = "v{}".format(new_version)
|
||||
|
Loading…
x
Reference in New Issue
Block a user