diff --git a/.ldoc/config.ld b/.ldoc/config.ld index 35606f3..b1bc9ed 100644 --- a/.ldoc/config.ld +++ b/.ldoc/config.ld @@ -35,7 +35,7 @@ favicon = "https://www.minetest.net/media/icon.svg" readme = ".ldoc/README.md" style = true -local version = 1.10 +local version = "1.10" file = { "settings.lua", diff --git a/set_version.py b/set_version.py index 8c40217..9e7a1a1 100755 --- a/set_version.py +++ b/set_version.py @@ -46,7 +46,11 @@ 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)