Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
More changes per Pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavkm committed Dec 28, 2015
1 parent 75d63c7 commit d1e8614
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Diagnostics;
using System.Globalization;
using Microsoft.AspNet.Razor.Chunks;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;

namespace Microsoft.AspNet.Razor.CodeGenerators.Visitors
{
Expand Down Expand Up @@ -74,20 +75,20 @@ protected override void Visit(SetBaseTypeChunk chunk)

protected override void Visit(TagHelperPrefixDirectiveChunk chunk)
{
VisitTagHelperDirectiveChunk(chunk.Prefix, chunk);
VisitTagHelperDirectiveChunk(chunk);
}

protected override void Visit(AddTagHelperChunk chunk)
{
VisitTagHelperDirectiveChunk(chunk.LookupText, chunk);
VisitTagHelperDirectiveChunk(chunk);
}

protected override void Visit(RemoveTagHelperChunk chunk)
{
VisitTagHelperDirectiveChunk(chunk.LookupText, chunk);
VisitTagHelperDirectiveChunk(chunk);
}

private void VisitTagHelperDirectiveChunk(string text, Chunk chunk)
private void VisitTagHelperDirectiveChunk(Chunk chunk)
{
// We should always be in design time mode because of the calling AcceptTree method verification.
Debug.Assert(Context.Host.DesignTimeMode);
Expand All @@ -98,6 +99,8 @@ private void VisitTagHelperDirectiveChunk(string text, Chunk chunk)
Writer.WriteVariableDeclaration("string", TagHelperDirectiveSyntaxHelper, "null");
}

var text = ((Span)chunk.Association).Content.Trim();

Writer
.WriteStartAssignment(TagHelperDirectiveSyntaxHelper)
.Write("\"");
Expand Down

0 comments on commit d1e8614

Please sign in to comment.