diff --git a/info.rkt b/info.rkt index dd34d49..4769990 100644 --- a/info.rkt +++ b/info.rkt @@ -1,3 +1,3 @@ #lang info -(define build-deps '("rackunit-lib" "web-server-lib" "http-easy-lib" "html-parsing" "html-writing" "json-pointer" "ini-lib" "memo" "net-cookies-lib")) +(define build-deps '("rackunit-lib" "web-server-lib" "http-easy-lib" "html-parsing" "html-writing" "json-pointer" "typed-ini-lib" "memo" "net-cookies-lib")) diff --git a/src/page-static-archive.rkt b/src/page-static-archive.rkt index a4e145f..0d01a59 100644 --- a/src/page-static-archive.rkt +++ b/src/page-static-archive.rkt @@ -41,14 +41,14 @@ [(string-prefix? url "http://") (regexp-replace #rx"http:" url "https:")] [(string-prefix? url "//") (string-append "https:" url)] [(string-prefix? url "/") (format "https://~a.fandom.com~a" wikiname url)] - [else (raise-user-error "While calling replace-style-for-images, this URL had an unknown format and couldn't be saved:" url)])]) + [else (error 'replace-style-for-images "unknown URL format: ~a" url)])]) (define p (image-url->values norm-url)) ;; (printf "hashed: ~a~n -> ~a~n #-> ~a~n" url (car p) (cdr p)) (format "/archive/~a/images/~a" wikiname (cdr p)))))) (define (replace-style-for-images wikiname path) (define content (file->string path)) - (regexp-replace* #rx"url\\(([^)]*)\\)" content (replacer wikiname))) + (regexp-replace* #rx"url\\(\"?'?([^)]*)'?\"?\\)" content (replacer wikiname))) (define (handle-style wikiname dest) (when (config-true? 'debug)