Skip to content

Commit 543fade

Browse files
Greg-Smulkovors
authored andcommitted
Lowercase description element name (#473)
Because all other elements are lowercase and this one is an exception. It breaks automatic processing of case-sensitive apps (e.g. based on XSLT).
1 parent 457b290 commit 543fade

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Markdown.MAML/Renderer/MamlRenderer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private static XElement CreateParameter(MamlParameter param, bool isSyntax = fal
118118
new XAttribute("aliases", param.Aliases.Any() ? string.Join(", ", param.Aliases) : "none"),
119119

120120
new XElement(mamlNS + "name", param.Name),
121-
new XElement(mamlNS + "Description", GenerateParagraphs(param.Description)),
121+
new XElement(mamlNS + "description", GenerateParagraphs(param.Description)),
122122
isSyntax && param.ParameterValueGroup.Any()
123123
? new XElement(commandNS + "parameterValueGroup", param.ParameterValueGroup.Select(pvg => CreateParameterValueGroup(pvg)))
124124
: null,

test/Markdown.MAML.Test/Renderer/MamlRendererTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ public void RendererProduceNameAndSynopsis()
9898
Assert.Single(description);
9999
Assert.Equal("This is a long description.", description[0]);
100100

101-
string[] parameter1 = EndToEndTests.GetXmlContent(maml, "/msh:helpItems/command:command/command:parameters/command:parameter[maml:name='Name']/maml:Description/maml:para");
101+
string[] parameter1 = EndToEndTests.GetXmlContent(maml, "/msh:helpItems/command:command/command:parameters/command:parameter[maml:name='Name']/maml:description/maml:para");
102102
Assert.Single(parameter1);
103103
Assert.Equal("This is the name parameter description.", parameter1[0]);
104104

105-
string[] parameter2 = EndToEndTests.GetXmlContent(maml, "/msh:helpItems/command:command/command:parameters/command:parameter[maml:name='Path']/maml:Description/maml:para");
105+
string[] parameter2 = EndToEndTests.GetXmlContent(maml, "/msh:helpItems/command:command/command:parameters/command:parameter[maml:name='Path']/maml:description/maml:para");
106106
Assert.Single(parameter2);
107107
Assert.Equal("This is the path parameter description.", parameter2[0]);
108108

0 commit comments

Comments
 (0)