diff --git a/src/utils/split-text.js b/src/utils/split-text.js index 2744ff7..973272a 100644 --- a/src/utils/split-text.js +++ b/src/utils/split-text.js @@ -46,7 +46,7 @@ export function splitText(el, key, splitOn, includePrevious, preserveWhitespace) if (contents.length) { // insert leading space if there was one if (wholeText[0] === ' ') { - allElements.push(createText(' ')); + allElements.push(createElement(F, "whitespace", " ", preserveWhitespace)); } // Concatenate the split text children back into the full array each(contents.split(splitOn), function(splitText, i) { @@ -59,7 +59,7 @@ export function splitText(el, key, splitOn, includePrevious, preserveWhitespace) }); // insert trailing space if there was one if (wholeText[wholeText.length - 1] === ' ') { - allElements.push(createText(' ')); + allElements.push(createElement(F, "whitespace", " ", preserveWhitespace)); } } });