anchor.diff:      "Alias of document.querySelectorAll"
       (ps:chain context (query-selector-all selector)))
     
  -  (defun create-match-object (body identifier)
  +  (defun create-match-object (body identifier index)
  +    "identifier: unique identifier for match, body: the text around the match,
  +index: the index of the match within the text node"
       (ps:create "type" "match" "identifier" identifier "body" body))
     
     (defun create-match-span (body identifier)
  
positive.code:           (end-index (+ index 20)))
        (ps:chain string (substring start-index end-index))))
    
    (defun get-substring-matches (search-string string case-sensitive-p)
      "Return all of substrings that match the search-string."
      (let ((search-string (if case-sensitive-p search-string (ps:chain search-string (to-lower-case))))
            (string (if case-sensitive-p string (ps:chain string (to-lower-case)))))
        (loop with i = (ps:chain string (index-of search-string 0))
              until (equal i -1)
              collect (create-match-object (get-substring i string) (incf *identifier*))
              do (setf i (ps:chain string (index-of search-string (+ i 1)))))))
    
    (defun matches-from-node (node query)
      (when (= (ps:chain (typeof (ps:@ node node-value))) "string")
        (ps:chain *matches* push (apply *matches*
                                        (get-substring-matches query (ps:@ node node-value) t)))))
    
    (defun walk-document (node process-node)
      (when (and node (not (ps:chain node first-child)))
  
negative.code: ;;; search-buffer.lisp --- functions to enable searching within a buffer
  
  ;;; NOTE: Consider using string.split instead of looping through the
  ;;; string to collect the matches. In using string split you can also
  ;;; save the information about preceding and succeeding characters
  ;;; within the string for assembling the final replacement node.
  
  (in-package :next)
  
  