Less code, smarter function, deal with text node
Less code, smarter function, deal with text node

Previously normalizeSpace assumed a parent node as
argument. Now it works also when you pass a text node
(this is the case of the paste).

nickbalestra/editable.js,upfrontIO/editable.js