Revert "Fix error on binary files"

Evgeny PisemskySat Aug 30 10:00:58+0300 2025

3660a7d

Revert "Fix error on binary files" This reverts commit acc27e86f6bee8b0625f9cdfe2b58b92042ecb78.

gitile/pages.scm

154154
       (a (@ (href "/" ,repository-name "/raw/" ,(or ref "-")
155155
                   "/" ,path))
156156
          (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)))))
167162
168163
(define* (project-files repository-name repo #:key (ref "-") (path '()))
169164
  (let* ((ref (if (equal? ref "-") #f ref))