Permalink
Browse files

merged revisions -c14206,14207

svn: r14208
  • Loading branch information...
1 parent b04efb5 commit aa24f7325ab15946b4d4d173147b140c025a9287 @elibarzilay elibarzilay committed Mar 22, 2009
Showing with 11 additions and 9 deletions.
  1. +10 −8 collects/scribblings/scribble/utils.ss
  2. +1 −1 collects/tests/scribble/main.ss
@@ -110,15 +110,17 @@
(define strs2 (split out-text))
(define strsm (map (compose split cdr) more))
(define (str->elts str)
+ (let ([spaces (regexp-match-positions #rx"(?:^| ) +" str)])
+ (if spaces
+ (list* (substring str 0 (caar spaces))
+ (hspace (- (cdar spaces) (caar spaces)))
+ (str->elts (substring str (cdar spaces))))
+ (list (make-element 'tt (list str))))))
+ (define (make-line str)
(if (equal? str "")
- (list (make-element 'newline (list "")))
- (let ([spaces (regexp-match-positions #rx"(?:^| ) +" str)])
- (if spaces
- (list* (substring str 0 (caar spaces))
- (hspace (- (cdar spaces) (caar spaces)))
- (str->elts (substring str (cdar spaces))))
- (list (make-element 'tt (list str)))))))
- (define (make-line str) (list (as-flow (make-element 'tt (str->elts str)))))
+ ;;FIXME: this works in html, but in latex it creates a redundant newline
+ (list (as-flow (make-element 'newline '())))
+ (list (as-flow (make-element 'tt (str->elts str))))))
(define (small-attr attr)
(make-with-attributes attr '([style . "font-size: 82%;"])))
(define (make-box strs)
@@ -134,7 +134,7 @@
(call-with-output-file (car m) #:exists 'truncate
(lambda (o) (display (cdr m) o))))
(set! thd (thread run))
- (t (with-limits 1 #f
+ (t (with-limits 2 #f
(if len-to-read (read-string len-to-read i) (port->string i)))
=> expected)
(t (begin (kill-thread thd) (cond [exn => raise] [else #t])))))

0 comments on commit aa24f73

Please sign in to comment.