From 6bc3dad1f45d8edfb044069f75f682b8dd93f58a Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 9 Aug 2013 19:10:07 -0700 Subject: [PATCH] updated paragraph-break? --- tests/requires/include-me.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/requires/include-me.rkt b/tests/requires/include-me.rkt index a4ec7df..12c2e2a 100644 --- a/tests/requires/include-me.rkt +++ b/tests/requires/include-me.rkt @@ -15,10 +15,10 @@ (check-equal? (meta-proc '(meta "key" "value")) '(meta ((name "key")(content "value"))))) -;; how a paragraph break is denoted: two or more newlines +;; how a paragraph break is denoted: a string of two or more newlines (define/contract (paragraph-break? x) (any/c . -> . boolean?) - (and (string? x) (->boolean (regexp-match #px"^\n{2,}$" x)))) + (and (string? x) (>= (len x) 2) (equal? x (make-string (len x) #\newline)))) (module+ test (check-false (paragraph-break? "foo"))