Don't render text tags for component documents (dotnet/aspnetcore-tooling#391)
\n\nCommit migrated from cb6f5d0dc7
This commit is contained in:
parent
7957c11d02
commit
607f64b386
|
|
@ -1148,6 +1148,15 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
public override void VisitMarkupElement(MarkupElementSyntax node)
|
||||
{
|
||||
if ((node.StartTag != null && node.StartTag.IsMarkupTransition) ||
|
||||
(node.EndTag != null && node.EndTag.IsMarkupTransition))
|
||||
{
|
||||
// We don't want to create a node for Markup transitions (<text></text>). Treat their contents as regular markup.
|
||||
// Technically there shouldn't be an end transition without a start transition but just being defensive.
|
||||
base.VisitMarkupElement(node);
|
||||
return;
|
||||
}
|
||||
|
||||
var element = new MarkupElementIntermediateNode()
|
||||
{
|
||||
Source = BuildSourceSpanFromNode(node),
|
||||
|
|
|
|||
Loading…
Reference in New Issue