From 47fdbd9e30e052cae9960cb161f370241c1d5110 Mon Sep 17 00:00:00 2001
From: kasperk81 <83082615+kasperk81@users.noreply.github.com>
Date: Wed, 9 Oct 2024 18:46:17 +0300
Subject: [PATCH 1/7] Recognize .slnx as XML
---
lib/linguist/languages.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml
index 9bde77235a..0a691a872e 100644
--- a/lib/linguist/languages.yml
+++ b/lib/linguist/languages.yml
@@ -8079,6 +8079,7 @@ XML:
- ".scxml"
- ".sfproj"
- ".shproj"
+ - ".slnx"
- ".srdf"
- ".storyboard"
- ".sublime-snippet"
From 0bf2bad87998839ecb8ab0b5f75235c4a928be3d Mon Sep 17 00:00:00 2001
From: kasperk81 <83082615+kasperk81@users.noreply.github.com>
Date: Wed, 9 Oct 2024 18:50:58 +0300
Subject: [PATCH 2/7] Add a sample .slnx
---
samples/Microsoft Visual Studio Solution/Robots.slnx | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 samples/Microsoft Visual Studio Solution/Robots.slnx
diff --git a/samples/Microsoft Visual Studio Solution/Robots.slnx b/samples/Microsoft Visual Studio Solution/Robots.slnx
new file mode 100644
index 0000000000..a56dadf61d
--- /dev/null
+++ b/samples/Microsoft Visual Studio Solution/Robots.slnx
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
From 1e5558d0623be64dc6b99ef42a8e6cdc4d4370cd Mon Sep 17 00:00:00 2001
From: kasperk81 <83082615+kasperk81@users.noreply.github.com>
Date: Mon, 14 Oct 2024 19:48:20 +0300
Subject: [PATCH 3/7] Delete samples/Microsoft Visual Studio
Solution/Robots.slnx
---
samples/Microsoft Visual Studio Solution/Robots.slnx | 10 ----------
1 file changed, 10 deletions(-)
delete mode 100644 samples/Microsoft Visual Studio Solution/Robots.slnx
diff --git a/samples/Microsoft Visual Studio Solution/Robots.slnx b/samples/Microsoft Visual Studio Solution/Robots.slnx
deleted file mode 100644
index a56dadf61d..0000000000
--- a/samples/Microsoft Visual Studio Solution/Robots.slnx
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
From 70aa0024a8290060554e756321da8747949e2b53 Mon Sep 17 00:00:00 2001
From: kasperk81 <83082615+kasperk81@users.noreply.github.com>
Date: Mon, 14 Oct 2024 19:49:17 +0300
Subject: [PATCH 4/7] Create Robots.slnx
---
samples/XML/Robots.slnx | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 samples/XML/Robots.slnx
diff --git a/samples/XML/Robots.slnx b/samples/XML/Robots.slnx
new file mode 100644
index 0000000000..a56dadf61d
--- /dev/null
+++ b/samples/XML/Robots.slnx
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
From 5b4937f3c5b6aa8834607dcf567e48c2af5e7548 Mon Sep 17 00:00:00 2001
From: kasperk81 <83082615+kasperk81@users.noreply.github.com>
Date: Mon, 14 Oct 2024 20:12:04 +0300
Subject: [PATCH 5/7] Add support for
Date: Mon, 14 Oct 2024 20:16:16 +0300
Subject: [PATCH 6/7] revert
---
lib/linguist/strategy/xml.rb | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/lib/linguist/strategy/xml.rb b/lib/linguist/strategy/xml.rb
index a7bbdbd728..8812e5f315 100644
--- a/lib/linguist/strategy/xml.rb
+++ b/lib/linguist/strategy/xml.rb
@@ -23,12 +23,7 @@ def self.call(blob, candidates = [])
return candidates if candidates.any?
header = blob.first_lines(SEARCH_SCOPE).join("\n")
-
- if /<\?xml version=/.match(header) || /<(Solution|Project)/.match(header)
- [Language["XML"]]
- else
- []
- end
+ /
Date: Mon, 14 Oct 2024 20:40:10 +0300
Subject: [PATCH 7/7] Update test_strategies.rb
---
test/test_strategies.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/test_strategies.rb b/test/test_strategies.rb
index b57ae907e6..b5640bee6b 100644
--- a/test/test_strategies.rb
+++ b/test/test_strategies.rb
@@ -189,7 +189,8 @@ def test_xml
"#{samples_path}/XML/some-ideas.mm",
"#{samples_path}/XML/GMOculus.project.gmx",
"#{samples_path}/XML/obj_control.object.gmx",
- "#{samples_path}/XML/MainView.axaml"
+ "#{samples_path}/XML/MainView.axaml",
+ "#{samples_path}/XML/Robots.slnx",
]
assert_all_xml all_xml_fixtures("*") - no_root_tag