anchor.diff:  (defpackage :alimenta.format
  -  (:use :cl :alexandria :serapeum :fw.lu))
  +  (:use :cl :alexandria :serapeum :fw.lu)
  +  (:export format-document format-title format-link format-paragraph))
   (in-package :alimenta.format)
   
   (defclass document-formatter ()
     ())
   
  -(defclass indent-formatter (document-formatter)
  -  ((%level :initarg :level :accessor level :initform 0)))
  -
  -(defclass html-formatter (document-formatter)
  -  ((%level :initarg :level :accessor level :initform 0)))
  -
  +;;; Formatting protocol
  +;; Generic entrypoint
   (defgeneric format-document (formatter stream document)
     (:documentation "Format a document with the given formatter to the given stream"))
   
  +;; Semantic formatters
   (defgeneric format-title (formatter title)
     (:documentation "Format a title according to FORMATTER"))
   
  
positive.code:     (format stream "~&~v,4@t~a~2&"
  	    (level formatter) (format-paragraph formatter (map 'list #'identity paragraphs)))))
  
  (defmethod format-document ((formatter indent-formatter) stream (document alimenta:feed))
    (call-next-method)
    (incf (level formatter))
    (for:for ((item over document))
      (format-document formatter stream item)))
  
  (defmethod format-document ((formatter html-formatter) stream (document alimenta:feed))
    (let ((ostream (or stream (make-string-output-stream))))
  
negative.code: (defgeneric format-paragraph (formatter paragraph)
    (:documentation "Format a paragraph according to FORMATTER"))
  
  ;;; Make alimenta's classes formattable
  
  (defmethod format-document (formatter stream (document alimenta::feed-entity))
    (format stream "~&~v,4@t~a~%~v,4@t~a~%"
  