Description
When selecting part of the text inside a hyperlink and applying bold formatting, the single <a> element is split into multiple <a> elements with the same href.
Steps to Reproduce
- Open the RoosterJS demo page
- Type or paste a URL (e.g.,
<http://www.google.com>) and let it auto-link
- Select part of the link text (e.g., select "google")
- Click the Bold button
Expected
<a href="<http://www.google.com>" title="<http://www.google.com>">
<http://www>.<b>google</b>.com
</a>
Actual
<a href="<http://www.google.com>" title="<http://www.google.com>"><http://www.></a>
<b><a href="<http://www.google.com>" title="<http://www.google.com>">google</a></b>
<a href="<http://www.google.com>" title="<http://www.google.com>">.com</a>
One anchor is split into three. This also applies to other inline formats like italic, underline, etc.