Splitting
Splitting copied to clipboard
<br /> with --char-index
Noticed on this pen that the <br>s were receiving a --char-index when using whitespace: true. Definitely something off with that.
I think this is a problem with this line: https://github.com/shshaw/Splitting/blob/master/src/utils/split-text.js#L22
This is intended for the character split with whitespace: true to add whitespace spans to be indexed. We need to do a check that className = whitespace. I think this is a result of allowing <br/> and other empty elements from being removed and this code not being updated.