]> git.ipfire.org Git - thirdparty/blocklistproject/lists.git/commitdiff
Update generate-dnsmasq.js
authorgap579137 <gap579137@gmail.com>
Fri, 11 Jun 2021 13:24:02 +0000 (08:24 -0500)
committergap579137 <gap579137@gmail.com>
Fri, 11 Jun 2021 13:24:02 +0000 (08:24 -0500)
scripts/generate-dnsmasq.js

index a34d1b596d32bd74f53143348554e39b9987bb32..f76bf89676f0dabe38cf7d8344e4661fd4601078 100644 (file)
@@ -8,7 +8,7 @@ const path = require("path");
                const noIPFileContents = fileContents
                .replaceAll(/^0\.0\.0\.0 /gmu, "server=/") // Replace all occurances of "0.0.0.0 " at the beginning of the line with "server=/"
                .replaceAll(/^# 0\.0\.0\.0 /gmu, "# server=/") // Replace all occurances of "# 0.0.0.0 " at the beginning of the line with "# server=/"
-               .replaceAll(/^(.*)$/gmu, "$0/") // I need this line to add "/" at the end of each URL
+               .replaceAll(/^(.*)$/gmu, "$1/") // I need this line to add "/" at the end of each URL
                .replace(/^# Title: (.*?)$/gmu, "# Title: $1 (NL)"); // Add (NL) to end of title
                await fs.writeFile(path.join(__dirname, "..", "dnsmasq-version", file.replace(".txt", "-dnsmasq.txt")), noIPFileContents, "utf8"); // Write new file to `alt-version` directory
        }));