When applying a text style to the same span multiple times, internal span tags get mangled.
Steps to re-create (follow closely):
1. Enter a block of text into an editor. I used:
Suspendisse potenti. Vivamus quam sapien, fringilla quis, volutpat sed, malesuada a, elit. Donec dapibus magna vel purus. Praesent vulputate blandit nibh? Ut lacus. Aliquam erat volutpat. Suspendisse diam. Mauris ullamcorper malesuada est? Nam blandit justo ultricies nunc. Sed dapibus tristique erat. Pellentesque viverra erat. Integer feugiat. Pellentesque suscipit lacus vitae elit. Fusce non lorem. Vivamus condimentum nunc eu eros.
2. Select some chunk of that, and change its font. I used "Curabitur... est."
3. Select some later chunk, and change its color. I used "Donec... purus."
4. Select some even later chunk, and change its size. I used "Ut lacus."
5. Use Ctrl+A to select all of the text. Change it to size 5.
6. Use Ctrl+A to select all of the text again. Change it to size 3.
It generated the following for me:
Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Curabitur tristique pulvinar est. Suspendisse potenti. Vivamus
quam sapien, fringilla quis, volutpat sed, malesuada a, elit. Donec dapibus magna vel purus.
Praesent vulputate blandit nibh? Ut lacus. Aliquam erat volutpat.
Suspendisse diam. Mauris ullamcorper malesuada est? Nam blandit justo
ultricies nunc. Sed dapibus tristique erat. Pellentesque viverra erat.
Integer feugiat. Pellentesque suscipit lacus vitae elit. Fusce non
lorem. Vivamus condimentum nunc eu eros.
The </span> tag after the font change got moved all the way to the end, rather than after the "est". Replicated on the demo page here.