EmailTagHelper.cs: context.GetChildContentAsync() => output.GetChildContentAsync()
parent
1aa1fcb8d3
commit
b1d63f0983
|
@ -9,7 +9,7 @@ namespace AuthoringTagHelpers.TagHelpers3
|
||||||
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
|
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
|
||||||
{
|
{
|
||||||
output.TagName = "a"; // Replaces <email> with <a> tag
|
output.TagName = "a"; // Replaces <email> with <a> tag
|
||||||
var content = await context.GetChildContentAsync();
|
var content = await output.GetChildContentAsync();
|
||||||
var target = content.GetContent() + "@" + EmailDomain;
|
var target = content.GetContent() + "@" + EmailDomain;
|
||||||
output.Attributes["href"] = "mailto:" + target;
|
output.Attributes["href"] = "mailto:" + target;
|
||||||
output.Content.SetContent(target);
|
output.Content.SetContent(target);
|
||||||
|
|
Loading…
Reference in New Issue