1
0
Fork 0

don't say I'm not lenient

* tekuti/post.scm (post-sxml-content): Don't throw an exception if a post
  fails to format.
This commit is contained in:
Andy Wingo 2008-03-11 23:43:20 +01:00
parent f1ef3f80cf
commit 4ebd686868

View file

@ -105,11 +105,16 @@
(git "show" (string-append (assq-ref post 'sha1) ":content")))
(define (post-sxml-content post)
(let ((format (or (assq-ref post 'format) 'wordpress)))
((case format
((wordpress) wordpress->sxml)
(else (lambda (text) `(pre ,text))))
(post-raw-content post))))
(let ((format (or (assq-ref post 'format) 'wordpress))
(raw (post-raw-content post)))
(catch #t
(lambda ()
(with-backtrace
(case format
((wordpress) (wordpress->sxml raw))
(else `(pre ,raw)))))
(lambda args
`(pre "Formatting error\n" ,raw)))))
(define (post-readable-date post)
(let ((date (time-utc->date