From: funilrys Date: Sun, 23 Feb 2020 11:37:34 +0000 (+0100) Subject: Fix link issue under Windows. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=f22d7bc3f027b29b7a04f1437cd89d79123b78f1;p=stevenblack-hosts.git Fix link issue under Windows. We never saw this, as we are not Windows user ourselves but there is a real issue. Indeed, as mentionned by @XhmikosR at https://github.com/StevenBlack/hosts/pull/1163#issuecomment-590057635 the web links are not correctly formated. Indeed, as we use `sep` to detect the right directory separator, it's also written into the `readmeData.json` file. This patch simply, replace the `\` of Windows, with the universal `/` of the web convention. --- diff --git a/updateReadme.py b/updateReadme.py index f99df81be..34baf2c1f 100644 --- a/updateReadme.py +++ b/updateReadme.py @@ -45,6 +45,9 @@ def main(): "Unified hosts **+ " + key.replace("-", " + ") + "**" ) + if "\\" in data[key]["location"]: + data[key]["location"] = data[key]["location"].replace("\\", "/") + toc_rows += s.substitute(data[key]) + "\n" row_defaults = {