Skip to content

Commit

Permalink
Another fix for attributes missing when more than one attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljcollins25 committed Aug 15, 2016
1 parent cd9fb07 commit 4af7be8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Common.targets
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<NuGetVersion>1.0.11</NuGetVersion>
<NuGetVersion>1.0.12</NuGetVersion>
<NuGetExePath>$(SrcRoot)\NuGet.exe</NuGetExePath>
</PropertyGroup>

Expand Down
5 changes: 3 additions & 2 deletions src/Microsoft.Language.Xml.Tests/TestParser.cs
Expand Up @@ -29,8 +29,9 @@ public void ParserErrorTolerance2()
[TestMethod]
public void ParserAttributeOnNonEmptyElement()
{
var document = T("<a b='bval'><c /></a>");
Assert.AreEqual(1, document.Root.Attributes.Count());
var document = T("<a b='bval' d='dval'><c /></a>");
Assert.AreEqual(2, document.Root.Attributes.Count());
Assert.AreEqual("bval", document.Root["b"]);
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Language.Xml/Syntax/XmlElementSyntax.cs
Expand Up @@ -11,7 +11,7 @@ public class XmlElementSyntax : XmlElementSyntaxBase
public override SyntaxNode Content { get; }

public XmlElementSyntax(XmlElementStartTagSyntax start, SyntaxNode content, XmlElementEndTagSyntax end) :
base(SyntaxKind.XmlElement, start?.NameNode, start)
base(SyntaxKind.XmlElement, start?.NameNode, start?.Attributes)
{
StartTag = start;
Content = content;
Expand Down

0 comments on commit 4af7be8

Please sign in to comment.