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:
parent
f1ef3f80cf
commit
4ebd686868
1 changed files with 10 additions and 5 deletions
|
@ -105,11 +105,16 @@
|
||||||
(git "show" (string-append (assq-ref post 'sha1) ":content")))
|
(git "show" (string-append (assq-ref post 'sha1) ":content")))
|
||||||
|
|
||||||
(define (post-sxml-content post)
|
(define (post-sxml-content post)
|
||||||
(let ((format (or (assq-ref post 'format) 'wordpress)))
|
(let ((format (or (assq-ref post 'format) 'wordpress))
|
||||||
((case format
|
(raw (post-raw-content post)))
|
||||||
((wordpress) wordpress->sxml)
|
(catch #t
|
||||||
(else (lambda (text) `(pre ,text))))
|
(lambda ()
|
||||||
(post-raw-content post))))
|
(with-backtrace
|
||||||
|
(case format
|
||||||
|
((wordpress) (wordpress->sxml raw))
|
||||||
|
(else `(pre ,raw)))))
|
||||||
|
(lambda args
|
||||||
|
`(pre "Formatting error\n" ,raw)))))
|
||||||
|
|
||||||
(define (post-readable-date post)
|
(define (post-readable-date post)
|
||||||
(let ((date (time-utc->date
|
(let ((date (time-utc->date
|
||||||
|
|
Loading…
Reference in a new issue