title: Self-closing TagHelper merges html markup of sibling element
body: <p>I'm litle confused with behaviour of <code>TagHelper</code> intoduced in ASP.NET Core MVC. Following this tutorial <a href="https://docs.asp.net/en/latest/mvc/views/tag-helpers/authoring.html#a-working-email-tag-helper" rel="noreferrer">A working email Tag Helper</a> we have opportunity to write self-closing tags. According to the article for this purpose we should use attbute <code>HtmlTargetElement</code>. Class below is demostrated as an example:</p>
  
  <pre><code> [HtmlTargetElement("email", TagStructure = TagStructure.WithoutEndTag)]
  public class EmailTagHelper : TagHelper
  {
      private const string EmailDomain = "contoso.com";
      public string MailTo { get; set; }
      public override void Process(TagHelperContext context, TagHelperOutput output)
      {
          output.TagName = "a";
          var address = MailTo + "@" + EmailDomain;
          output.Attributes.SetAttribute("href", "mailto:" + address);
          output.Content.SetContent(address);
      }
  }
  </code></pre>
  
  <p>The markup in razor view like:</p>
  
  <pre><code>&lt;strong&gt;Support:&lt;/strong&gt;
      &lt;email mail-to="Support"/&gt;&lt;br /&gt;
  &lt;strong&gt;Marketing:&lt;/strong&gt;
      &lt;email mail-to="Marketing"/&gt;
  </code></pre>
  
  <p>But I have unexpected output:</p>
  
  <pre><code>&lt;strong&gt;Support:&lt;/strong&gt;
  &lt;a href="mailto:Support@contoso.com"&gt;
      &lt;span&gt;Another content&lt;/span&gt;
      &lt;strong&gt;Marketing:&lt;/strong&gt;
  &lt;/a&gt;
  &lt;a href="mailto:Marketing@contoso.com"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>Why the first anchor tag contains <code>&lt;span&gt;</code> and <code>&lt;strong&gt;</code> tags content?<br/>
  Without <code>HtmlTargetElement</code> attribute and with closing tags <code>&lt;/email&gt;</code> in razor view I have correct behaviour.</p>