From 89ef2b53ea136fdec96833bad8c849f941fa4c1a Mon Sep 17 00:00:00 2001 From: gahlonca Date: Sat, 5 Jan 2019 13:43:38 -0500 Subject: [PATCH 1/3] Automatically activate syntax highlight using firstLine in package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 50051298cd19..f1f56c6929dd 100644 --- a/package.json +++ b/package.json @@ -1699,6 +1699,7 @@ }, "languages": [ { + "firstLine": "^#!/.*\\bpython[0-9.-]*\\b|", "id": "pip-requirements", "aliases": [ "pip requirements", From 225a265dc6f75c4282ec99afd59fe99256040a5b Mon Sep 17 00:00:00 2001 From: gahlonca Date: Sat, 5 Jan 2019 15:38:17 -0500 Subject: [PATCH 2/3] Adding news file for 3892 --- news/1 Enhancements/3892.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 news/1 Enhancements/3892.md diff --git a/news/1 Enhancements/3892.md b/news/1 Enhancements/3892.md new file mode 100644 index 000000000000..ee19a1359020 --- /dev/null +++ b/news/1 Enhancements/3892.md @@ -0,0 +1,2 @@ +Use firstLine to activate syntax highlinging for files without extensions +(thanks to [Christopher Gahlon](https://github.com/cgahlon/)) From af9d0c1d84fac98fc11e692cdf452e0c5eb95d84 Mon Sep 17 00:00:00 2001 From: Christopher Gahlon Date: Fri, 18 Jan 2019 16:03:15 -0500 Subject: [PATCH 3/3] Removed errant pipe from end of firstLine. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f1f56c6929dd..4e0f77332e1b 100644 --- a/package.json +++ b/package.json @@ -1699,7 +1699,7 @@ }, "languages": [ { - "firstLine": "^#!/.*\\bpython[0-9.-]*\\b|", + "firstLine": "^#!/.*\\bpython[0-9.-]*\\b", "id": "pip-requirements", "aliases": [ "pip requirements",