Revert "Fix error on binary files" This reverts commit acc27e86f6bee8b0625f9cdfe2b58b92042ecb78.
gitile/pages.scm
| 154 | 154 | (a (@ (href "/" ,repository-name "/raw/" ,(or ref "-") | |
| 155 | 155 | "/" ,path)) | |
| 156 | 156 | (img (@ (src "/images/file-type-3.svg")))))) | |
| 157 | - | ,(with-exception-handler | |
| 158 | - | (lambda (exn) | |
| 159 | - | `(pre "Binary data")) | |
| 160 | - | (lambda () | |
| 161 | - | (let ((content (utf8->string (get-file-content repo path #:ref ref)))) | |
| 162 | - | (if (string-suffix? ".md" path) | |
| 163 | - | `(article (@ (class "formatted-file-content")) | |
| 164 | - | ,(improve-content (commonmark->sxml content))) | |
| 165 | - | (display-code content path)))) | |
| 166 | - | #:unwind? #t))) | |
| 157 | + | ,(let ((content (utf8->string (get-file-content repo path #:ref ref)))) | |
| 158 | + | (if (string-suffix? ".md" path) | |
| 159 | + | `(article (@ (class "formatted-file-content")) | |
| 160 | + | ,(improve-content (commonmark->sxml content))) | |
| 161 | + | (display-code content path))))) | |
| 167 | 162 | ||
| 168 | 163 | (define* (project-files repository-name repo #:key (ref "-") (path '())) | |
| 169 | 164 | (let* ((ref (if (equal? ref "-") #f ref)) |