From: gap579137 Date: Fri, 11 Jun 2021 13:24:02 +0000 (-0500) Subject: Update generate-dnsmasq.js X-Git-Tag: aggregated-20250518~569 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=037a7c382166a8ed6d1697d79e782bc91e9bde90;p=thirdparty%2Fblocklistproject%2Flists.git Update generate-dnsmasq.js --- diff --git a/scripts/generate-dnsmasq.js b/scripts/generate-dnsmasq.js index a34d1b5..f76bf89 100644 --- a/scripts/generate-dnsmasq.js +++ b/scripts/generate-dnsmasq.js @@ -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 }));