anchor.diff:                          (header-level item))))))
       (setf marks (nreverse marks))
       (concatenate 'list
  -                 (subseq raw-wiki start (or (car marks) end))
  +                 ;;(subseq raw-wiki start (or (car marks) end))
  +                 (make-paragraphs raw-wiki :start start :end (or (car marks) end))
                    (iter (for m on marks)
                          (collect (list* 'chapter
  -                                       (header-strim (nth (car m) raw-wiki))
  +                                       ;;(header-strim (nth (car m) raw-wiki))
  +                                       (header-strim (aref raw-wiki  (car m)))
                                          (make-chapter-tree raw-wiki
                                                             :start (1+ (first m))
                                                             :end (second m)))))))))
  
positive.code:   (:continue "\\n  "
               "\\n\\t"))
  
  (define-mode code (200 :protected)
    (:entry "<code>(?=.*</code>)"
            "<code \\w*>(?=.*</code>)")
    (:exit "</code>"))
  
  (define-mode file (210 :protected)
  
negative.code: 
  (remake-lexer 'toplevel)
  
  ;; union-same-items
  
  (defparameter *union-same-items* '(preformatted listblock quoted))
  
  (defun find-same-items (wikidoc &optional (start 0) (end (length wikidoc)))
    (let* ((pos1 (position-if #'(lambda (item)
                                  (and (consp item)
                                       (find (car item) *union-same-items*)))
                              wikidoc
                              :start start
                              :end end))
           (pos2 (if pos1
                     (or (position-if #'(lambda (item)
                                          (not (and (consp item)
                                                    (eql (car item) (car (aref wikidoc pos1))))))
                                      wikidoc
                                      :start (1+ pos1)
                                      :end end)
                         end))))
      (if pos1
          (cons pos1 pos2))))
    
  (defun union-same-item (wikidoc &optional (start 0) (end (length wikidoc)))
    (let ((curpos start)
          (result nil))
      (iter (for same = (find-same-items wikidoc curpos end))
            (while same)
            (when (> (car same) curpos)
              (iter (for pos from curpos below (car same))
                    (push (aref wikidoc pos)
                          result)))
            (push (cons (car (aref wikidoc (car same)))
                        (iter (for pos from (car same) below (cdr same))
                              (collect (cdr (aref wikidoc pos)))))
                  result)
            (setf curpos
                  (cdr same)))
      (when (< curpos end)
        (iter (for pos from curpos below end)
              (push (aref wikidoc pos)
                    result)))
      (if result
          (nreverse result)
          (coerce (subseq wikidoc start end) 'list))))
    
  
  ;;; make-paragraphs
  
  (defun find-paragraph (wikidoc &optional (start 0) (end (length wikidoc)))
    (let* ((pos1 (position-if #'stringp
                              wikidoc
                              :start start
                              :end end))
           (pos2 (if pos1
                     (position 'eol
                               wikidoc
                               :start pos1
                               :end end))))
      (if pos1
          (progn
            (iter (while (and pos2
                              (< pos2 (1- end))
                              (not (eql (aref wikidoc (1+ pos2)) 'eol))))
                  (setf pos2
                        (position 'eol
                                  wikidoc
                                  :start (1+ pos2)
                                  :end end)))
            (cons pos1
                  (or pos2 end))))))
  
            
  
  (defun make-paragraphs (wikidoc &key (start 0) (end (length wikidoc)))
    (let ((curpos start)
          (result nil))
      (iter (for p = (find-paragraph wikidoc curpos end))
            (while p)
            (when (> (car p) curpos)
              (iter (for item in (union-same-item wikidoc curpos (car p)))
                    (push item
                          result)))
            (push (cons 'paragraph
                        (union-same-item wikidoc (car p) (cdr p)))
                  result)
            (setf curpos
                  (cdr p)))
      (iter (for item in (union-same-item wikidoc curpos end))
            (push item
                  result))
      (if result
          (nreverse result)
          (subseq wikidoc start end))))
    
  
  ;;; make-chapter-tree
  
  (defun header-level (header)
    (let ((str (string-trim #(#\Space #\Tab) (second header))))
  