From: Siraaj Khandkar Date: Wed, 17 Mar 2021 15:15:17 +0000 (-0400) Subject: Support comments X-Git-Tag: 0.5.0~3 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=4a94ef7b845c4a515352e4d14e46e81650841e29;p=tt.git Support comments --- diff --git a/tt.rkt b/tt.rkt index 230e6ac..455e6e5 100644 --- a/tt.rkt +++ b/tt.rkt @@ -210,8 +210,11 @@ (define toks (string-split str)) (apply feed toks)) +(define (filter-comments lines) + (filter-not (λ (line) (string-prefix? line "#")) lines)) + (define (str->feeds str) - (map str->feed (str->lines str))) + (map str->feed (filter-comments (str->lines str)))) (define (file->feeds filename) (str->feeds (file->string filename)))