code: function trim(rootBlockNode) {
              if (rootBlockNode) {
                node = rootBlockNode.firstChild;
                if (node && node.type == 3) {
                  node.value = node.value.replace(startWhiteSpaceRegExp, '');
                }
  
                node = rootBlockNode.lastChild;
                if (node && node.type == 3) {
                  node.value = node.value.replace(endWhiteSpaceRegExp, '');
                }
              }
            }
docs: Removes whitespace at beginning and end of block so: <p> x </p> -> <p>x</p>