fix for `scribble --text' and tables
original commit: dcedd6e2be5b58bf5f26e1a5c7f5305502d889f8
This commit is contained in:
parent
f5ce9df901
commit
f330897ca1
|
@ -99,12 +99,13 @@
|
|||
(if (eq? i 'cont)
|
||||
0
|
||||
(apply max d (map string-length i)))))
|
||||
(apply map list strs))])
|
||||
(apply map list strs))]
|
||||
[x-length (lambda (col) (if (eq? col 'cont) 0 (length col)))])
|
||||
(for/fold ([indent? #f]) ([row (in-list strs)])
|
||||
(let ([h (apply max 0 (map length row))])
|
||||
(let ([h (apply max 0 (map x-length row))])
|
||||
(let ([row* (for/list ([i (in-range h)])
|
||||
(for/list ([col (in-list row)])
|
||||
(if (i . < . (length col))
|
||||
(if (i . < . (x-length col))
|
||||
(list-ref col i)
|
||||
"")))])
|
||||
(for/fold ([indent? indent?]) ([sub-row (in-list row*)])
|
||||
|
@ -116,7 +117,7 @@
|
|||
""
|
||||
col)])
|
||||
(display col)
|
||||
(display (make-string (- w (string-length col)) #\space)))
|
||||
(display (make-string (max 0 (- w (string-length col))) #\space)))
|
||||
#t)
|
||||
(newline)
|
||||
#t)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user