docs: function mergeEmoticons(child, index, parent) {
    var siblings
    var value
    var siblingIndex
    var node
    var emoticon
    var subvalue
  
    /* Check if `child`s first character could be used
     * to start an emoticon. */
    if (start.indexOf(toString(child).charAt(0)) !== -1) {
      siblings = parent.children
      siblingIndex = index
      node = child
      value = ''
  
      while (node) {
        if (value.length >= MAX_EMOTICON_LENGTH) {
          return
        }
  
        subvalue = toString(node)
  
        value += subvalue
  
        /* The second test, if the last character of
         * the current node is superfluous but
         * improves performance by 30%. */
        if (
          node.type !== EMOTICON_NODE &&
          end.indexOf(subvalue.charAt(subvalue.length - 1)) !== -1 &&
          emoticons.indexOf(value) !== -1
        ) {
          emoticon = {type: EMOTICON_NODE, value: value}
  
          if (child.position && node.position) {
            emoticon.position = {
              start: child.position.start,
              end: node.position.end
            }
          }
  
          siblings.splice(index, siblingIndex - index + 1, emoticon)
  
          /* Some emoticons, like `:-`, can be followed by
           * more characters to form other emoticons. */
          return index - 1
        }
  
        node = siblings[++siblingIndex]
      }
    }
  }