Splitting icon indicating copy to clipboard operation
Splitting copied to clipboard

<br /> with --char-index

Open shshaw opened this issue 7 years ago • 2 comments

Noticed on this pen that the <br>s were receiving a --char-index when using whitespace: true. Definitely something off with that.

shshaw avatar Aug 22 '18 22:08 shshaw

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.

notoriousb1t avatar Aug 23 '18 18:08 notoriousb1t