Skip to content

Commit b73af24

Browse files
MAML conversion uses the function name as Verb and empty string as noun (#742)
1 parent 722fe8d commit b73af24

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/MamlWriter/MamlHelpers.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,18 @@ private static CommandDetails ConvertCommandDetails(CommandHelp commandHelp)
216216
var details = new CommandDetails();
217217
details.Name = commandHelp.Title;
218218
string[] verbNoun = commandHelp.Title.Split('-');
219-
details.Verb = verbNoun[0];
220-
details.Noun = verbNoun[1];
219+
220+
if (verbNoun.Length == 2)
221+
{
222+
details.Verb = verbNoun[0];
223+
details.Noun = verbNoun[1];
224+
}
225+
else
226+
{
227+
details.Verb = commandHelp.Title;
228+
details.Noun = string.Empty;
229+
}
230+
221231
details.Synopsis.Add(commandHelp.Synopsis);
222232
return details;
223233
}

0 commit comments

Comments
 (0)