diff --git a/collects/scribble/core.rkt b/collects/scribble/core.rkt index 42f8ea6ea7..9ef225cea7 100644 --- a/collects/scribble/core.rkt +++ b/collects/scribble/core.rkt @@ -135,6 +135,12 @@ (and (string? s) (not (regexp-match? #rx"\n" s)))) +(define (same-lengths? ls) + (or (null? ls) + (let ([l1 (length (car ls))]) + (andmap (λ (l) (= l1 (length l))) + (cdr ls))))) + (provide-structs [part ([tag-prefix (or/c false/c string?)] [tags (listof tag?)] @@ -146,7 +152,8 @@ [paragraph ([style style?] [content content?])] [table ([style style?] - [blockss (listof (listof (or/c block? (one-of/c 'cont))))])] + [blockss (and/c (listof (listof (or/c block? (one-of/c 'cont)))) + same-lengths?)])] [delayed-block ([resolve (any/c part? resolve-info? . -> . block?)])] [itemization ([style style?] [blockss (listof (listof block?))])] diff --git a/collects/scribblings/inside/utils.rkt b/collects/scribblings/inside/utils.rkt index d63eb7590d..255101af9b 100644 --- a/collects/scribblings/inside/utils.rkt +++ b/collects/scribblings/inside/utils.rkt @@ -76,7 +76,7 @@ #f (append (if super-long? - (list (list (to-flow ret) 'cont 'cont 'cont 'cont)) + (list (list (to-flow ret) 'cont 'cont)) null) (list (append