From 72561027854b517fd304df4d6172a34fb790ba2e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 9 Jan 2022 05:58:39 -0600 Subject: [PATCH] Unix line-endings for extensions.json (#4153) --- .../tpls/vscode/.vscode/extensions.json.tpl | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/platformio/project/tpls/vscode/.vscode/extensions.json.tpl b/platformio/project/tpls/vscode/.vscode/extensions.json.tpl index 1b2dfdd9..126d45d8 100644 --- a/platformio/project/tpls/vscode/.vscode/extensions.json.tpl +++ b/platformio/project/tpls/vscode/.vscode/extensions.json.tpl @@ -1,23 +1,23 @@ -% import json -% import os -% import re -% -% recommendations = set(["platformio.platformio-ide"]) -% previous_json = os.path.join(project_dir, ".vscode", "extensions.json") -% if os.path.isfile(previous_json): -% fp = open(previous_json) -% contents = re.sub(r"^\s*//.*$", "", fp.read(), flags=re.M).strip() -% fp.close() -% if contents: -% recommendations |= set(json.loads(contents).get("recommendations", [])) -% end -% end -{ - // See http://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format - "recommendations": [ -% for i, item in enumerate(sorted(recommendations)): - "{{ item }}"{{ ("," if (i + 1) < len(recommendations) else "") }} -% end - ] -} +% import json +% import os +% import re +% +% recommendations = set(["platformio.platformio-ide"]) +% previous_json = os.path.join(project_dir, ".vscode", "extensions.json") +% if os.path.isfile(previous_json): +% fp = open(previous_json) +% contents = re.sub(r"^\s*//.*$", "", fp.read(), flags=re.M).strip() +% fp.close() +% if contents: +% recommendations |= set(json.loads(contents).get("recommendations", [])) +% end +% end +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ +% for i, item in enumerate(sorted(recommendations)): + "{{ item }}"{{ ("," if (i + 1) < len(recommendations) else "") }} +% end + ] +}