1

Closed

Razor parser returns incorrect data tree for @section a {something}

description

output returned by Razor parser for “@section a {something}” is as below. tree returned in incorrect.
  • block {Markup Block at (0:0,0)::33 (Gen:None)} System.Web.Razor.Parser.SyntaxTree.Block
  • base {Markup Block at (0:0,0)::33 (Gen:None)} System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode {System.Web.Razor.Parser.SyntaxTree.Block}
  • Children Count = 3 System.Collections.Generic.IEnumerable<System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode> {System.Collections.Generic.List<System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode>}
  • [0] {Markup Span at (0:0,0)::0 - [] Edit: <SpanEditHandler;Accepts:Any> Gen: <Markup> {HtmlSymbol:1}} System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode {System.Web.Razor.Parser.SyntaxTree.Span}
  • [1] {Section Block at (0:0,0)::21 (Gen:Section:a)} System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode {System.Web.Razor.Parser.SyntaxTree.Block}
  • [2] {Markup Span at (12:0,12)::12 - [something}
    ] Edit: <SpanEditHandler;Accepts:Any> Gen: <Markup> {HtmlSymbol:2}} System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode {System.Web.Razor.Parser.SyntaxTree.Span}
Closed Jun 7, 2013 at 9:50 PM by yjhong
Verified with the 5/30 build

comments

yishaigalatzer wrote Apr 23, 2013 at 7:24 PM

The issue here is that we require a space between the end of markup and the closing curly brace.

If the space is missing we don't transition out of the markup span.

nowakra wrote Apr 27, 2013 at 3:54 AM

Resolved by 6bec1836c73e