From f22d7bc3f027b29b7a04f1437cd89d79123b78f1 Mon Sep 17 00:00:00 2001 From: funilrys Date: Sun, 23 Feb 2020 12:37:34 +0100 Subject: [PATCH] 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. --- updateReadme.py | 3 +++ 1 file changed, 3 insertions(+) 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 = {