Skip to content

Commit

Permalink
Prefer new help content for elements, but fall back to existing help.
Browse files Browse the repository at this point in the history
  • Loading branch information
tintoy committed Apr 14, 2018
1 parent 1493f93 commit 0d6e348
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/LanguageServer.SemanticModel.MSBuild/MSBuildSchemaHelp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ public static string ForElement(string elementName)
throw new ArgumentException("Argument cannot be null, empty, or entirely composed of whitespace: 'elementName'.", nameof(elementName));

string helpKey = elementName;

// Prefer new help content (includes links to documentation).
if (ElementHelp.TryGetValue(helpKey, out ElementHelp elementHelp))
return elementHelp.Description;

// Fall back to existing help content.
if (Root.TryGetValue(helpKey, out string help))
return help;

Expand Down

1 comment on commit 0d6e348

@tintoy
Copy link
Owner Author

@tintoy tintoy commented on 0d6e348 Apr 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this fallback when all help content has been migrated.

Please sign in to comment.