 #    console.log match.element.node.data
 
     # the HTML source of the text inside a text element.
+#    console.log "Calculating source position at " + match.element.path
     sourceText = match.element.node.data.replace /\n/g, " "
 #    console.log "sourceText is '" + sourceText + "'"
 

        # This is a text element that should not even be here.
        # Selecting it might select the whole table,
        # so we don't select anything

      else
        range.setStartBefore node
        range.setEndAfter node
        sel.addRange range


    if scroll
      sn = node
      while not sn.scrollIntoViewIfNeeded?

    content = pathInfo?.content

    if not content? or content is ""
      # node has no content, not interesting
      pathInfo.start = parentIndex + index
      pathInfo.end = parentIndex + index
      pathInfo.atomic = false
      return index

    startIndex = if parentContent? then (parentContent.indexOf content, index) else index
    if startIndex is -1
       # content of node is not present in parent's content - probably hidden, or something similar
