summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-09-29 18:18:01 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-09-29 18:18:01 -0400
commit91b3344feafc5c2da6f4560783575c27eb43a42e (patch)
treec52f6f788063e65183d9919c34c2f58c4159d3b7
parentb73234b56d816ba68c0f92a9d356ea85941dca94 (diff)
downloadSMAPI-91b3344feafc5c2da6f4560783575c27eb43a42e.tar.gz
SMAPI-91b3344feafc5c2da6f4560783575c27eb43a42e.tar.bz2
SMAPI-91b3344feafc5c2da6f4560783575c27eb43a42e.zip
fix mod web API returning a concatenated name for mods with alternate names
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityClient.cs2
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 12886019..7c25eba6 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -35,6 +35,7 @@
* Added a 'paranoid warnings' option which reports mods using potentially sensitive .NET APIs (like file or shell access) in the mod issues list.
* Adjusted `SaveBackup` mod to make it easier to account for custom mod subfolders in the installer.
* Installer no longer special-cases Omegasis' older `SaveBackup` mod (now named `AdvancedSaveBackup`).
+ * Fixed mod web API returning a concatenated name for mods with alternate names.
## 2.7
* For players:
diff --git a/src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityClient.cs b/src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityClient.cs
index 929284c3..4060ed36 100644
--- a/src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityClient.cs
+++ b/src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityClient.cs
@@ -74,7 +74,7 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki
foreach (HtmlNode node in nodes)
{
// parse mod info
- string name = node.Descendants("td").FirstOrDefault()?.InnerText?.Trim();
+ string name = node.Descendants("td").FirstOrDefault()?.Descendants("a")?.FirstOrDefault()?.InnerText?.Trim();
string[] ids = this.GetAttribute(node, "data-id")?.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(p => p.Trim()).ToArray() ?? new string[0];
int? nexusID = this.GetNullableIntAttribute(node, "data-nexus-id");
int? chucklefishID = this.GetNullableIntAttribute(node, "data-chucklefish-id");