correction

main
Matthew Butterick 8 years ago
parent add59cce6b
commit 5a06b48f20

@ -11,7 +11,7 @@
(lexer
[(eof) eof]
[alphabetic (string->symbol lexeme)]
[(:: (:? "-") (:+ numeric) (:? (:: "." (:+ numeric)))) (string->number lexeme)]
[(:: (:? "-") (:* numeric) (:? ".") (:+ numeric)) (string->number lexeme)]
[(:or whitespace ",") (lex-1 input-port)]))
(slicef-at (for/list ([tok (in-port lex-1 (open-input-string path))])
tok) symbol?))

@ -1,8 +1,10 @@
#lang pitfall/pdftest
(define-runtime-path tiger "assets/tiger.json")
(define (proc doc)
(send doc translate 220 300)
(for* ([datum (in-list (read (open-input-string (string-replace (file->string "assets/tiger.json") #rx"[,:]" " "))))]
(for* ([datum (in-list (read (open-input-string (string-replace (file->string tiger) #rx"[,:]" " "))))]
[part (in-value (apply hash datum))])
(send doc path (hash-ref part 'path))

Binary file not shown.

@ -9,8 +9,10 @@
[text "Another fantastic pic" 100 100 (hash 'lineBreak #f)]
[image pic 100 160 (hash 'width 412)]))
; node's zlib.deflate makes smaller files, for some reason
; so don't compare file sizes in this case
(define-runtime-path this "test8rkt.pdf")
(make-doc this #f proc #:pdfkit #f) ; node's zlib.deflate makes smaller files, for some reason
(make-doc this #f proc #:pdfkit #f)
(define-runtime-path that "test8crkt.pdf")
(make-doc that #t proc #:pdfkit #f)

Loading…
Cancel
Save