commit 027d80e352d23eea1563319031b6c9d8312712d0 parent d8f6292e363c0c0b26ba321e6c0edd6f276f802e Author: Robby Findler <robby@racket-lang.org> Date: Sat, 11 Jun 2011 08:57:42 -0500 added a missing error check to scribble decoding original commit: ecf45ab426b5215a71f31ffb223dfce7cadd66fd Diffstat:
| M | collects/scribble/decode.rkt | | | 11 | +++++++---- |
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/collects/scribble/decode.rkt b/collects/scribble/decode.rkt @@ -189,10 +189,13 @@ (part-to-collect part) (append para (part-blocks part)) (cons (car l) (part-parts part))))] - [(and (part-start? (car l)) - (or (not part-depth) - ((part-start-depth (car l)) . <= . part-depth))) - (unless part-depth (error 'decode "misplaced part: ~e" (car l))) + [(part-start? (car l)) + (unless part-depth + (error 'decode "misplaced part; title: ~s" (part-start-title (car l)))) + (unless ((part-start-depth (car l)) . <= . part-depth) + (error 'decode + "misplaced part (the part is more than one layer deeper than its container); title: ~s" + (part-start-title (car l)))) (let ([s (car l)]) (let loop ([l (cdr l)] [s-accum null]) (if (or (null? l)