function mergeConsecutiveTextNodes(nodeList, idx, notLiveList) {
      var node = nodeList[idx];
      var parent = node.parentNode;
      var sibling;

      if (node.nodeType !== NODE_TYPE_TEXT) {
        return;
      }

      while (true) {
        sibling = parent ? node.nextSibling : nodeList[idx + 1];
        if (!sibling || sibling.nodeType !== NODE_TYPE_TEXT) {
          break;
        }

        node.nodeValue = node.nodeValue + sibling.nodeValue;

        if (sibling.parentNode) {
          sibling.parentNode.removeChild(sibling);
        }
        if (notLiveList && sibling === nodeList[idx + 1]) {
          nodeList.splice(idx + 1, 1);
        }
      }
    }
@ngdoc method
@name $location#path

@description
This method is getter / setter.

Return path of current URL when called without any parameter.

Change path when called with parameter and return `$location`.

Note: Path should always begin with forward slash (/), this method will add the forward slash
if it is missing.


```js
// given URL http://example.com/#/some/path?foo=bar&baz=xoxo
var path = $location.path();
// => "/some/path"
```

@param {(string|number)=} path New path
@return {(string|object)} path if called with no parameters, or `$location` if called with a parameter