anchor.diff:  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   ;; Endnote rewriting
   
  -(defun endnotes (doc)
  +(defun endnotes (doc config)
  +  (declare (ignore config))
     "Rewrite a doc with :note elements converted to endnotes."
  -  (if (extract :note doc)
  +  (if (has :note doc)
         (funcall
          (>>>
           (rewriter :note (numberer))
  
positive.code:          config)))))
  
  (defun markup-html (doc config)
    (let ((has-tweets (extract :tweet doc))
          (dateline (or (first (extract :dateline doc)) (config :dateline config))))
      (destructuring-bind (&key year &allow-other-keys) (or (parse-iso-8601 (just-text dateline)) (progn (warn "No dateline!") '(:year 2017)))
        (let ((config (cons `(:year ,year) config)))
          (funcall
           (>>>
            ;; Massaging the Markup structure into HTML.
            #'links
            #'endnotes
            (rewriter :img #'(lambda (img) `(:img :src ,@(rest img))))
  
            ;; Special sections specified in config file.
            (section-rewriter (config :sections config) config)
  
            ;; Other sections get turned into divs.
            (rewriter :section #'(lambda (s) (divver (second s))))
  
            ;; Section markers
            (rewriter :§ (replacing-with (first (config :section-marker config))))
            (rewriter :blank (replacing-with (first (config :blank config))))
  
            ;; Spans.
            (spans-rewriter (config :spans config))
  
            ;; Turn into HTML
            (htmlizer config)
  
            #'(lambda (d)
  
negative.code:              #'(lambda (tree)
                   (if (eql (car (second tree)) tag) (funcall fn (second tree) config) tree))))
      #'(lambda (doc)
          (funcall
           (rewriter :section #'(lambda (s) (divver (second s))))
           (reduce #'apply-section (config :sections config) :initial-value doc)))))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; Configuration
  