user-select: none causes blank line

when selecting multiple spans in a pre block where each span has user-select:none, a blank line is copied after each such "noselect" class

by kaushalmodi

HTML

<style>
.noselect {
  user-select: none;
}
</style>
<pre>
<span class=noselect>1</span><span>line a</span>
<span class=noselect>2</span><span>line b</span>
</pre>