React to rewriter bad merge.

This commit is contained in:
N. Taylor Mullen 2015-05-12 17:49:39 -07:00
parent 2c9856d4da
commit d6cb4229a9
1 changed files with 3 additions and 2 deletions

View File

@ -400,21 +400,22 @@ namespace Microsoft.AspNet.Razor.Parser.TagHelpers.Internal
private static SourceLocation GetAttributeNameStartLocation(SyntaxTreeNode node) private static SourceLocation GetAttributeNameStartLocation(SyntaxTreeNode node)
{ {
Span span; Span span;
var nodeStart = SourceLocation.Undefined;
if (node.IsBlock) if (node.IsBlock)
{ {
span = ((Block)node).FindFirstDescendentSpan(); span = ((Block)node).FindFirstDescendentSpan();
nodeStart = span.Parent.Start;
} }
else else
{ {
span = (Span)node; span = (Span)node;
nodeStart = span.Start;
} }
// Span should never be null here, this should only ever be called if an attribute was successfully parsed. // Span should never be null here, this should only ever be called if an attribute was successfully parsed.
Debug.Assert(span != null); Debug.Assert(span != null);
var nodeStart = span.Parent.Start;
// Attributes must have at least one non-whitespace character to represent the tagName (even if its a C# // Attributes must have at least one non-whitespace character to represent the tagName (even if its a C#
// expression). // expression).
var firstNonWhitespaceSymbol = span var firstNonWhitespaceSymbol = span