Minor typo in recent new regexp.

This commit is contained in:
Eli Barzilay 2011-12-28 21:06:22 -05:00
parent 064a914fb2
commit 3fcd3c04d5

View File

@ -7,7 +7,7 @@
(define (encode-for-header s)
(cond [(not (regexp-match? re:non-ascii s)) s]
[(not (regexp-match? #rx"\r\n" s)) (encode-line-for-header s)] ; speed
[(not (regexp-match? #rx"[\r\n]" s)) (encode-line-for-header s)] ; speed
[else (regexp-replace* #rx"[^\r\n]+" s encode-line-for-header)]))
;; Note: the following two encoder wrappers remove newlines from the