From 59c59f758de403dda6a00c4f62d3ddec36243340 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 18 Oct 2015 09:41:21 -0400 Subject: parsers: Fix parse-delimited. The 'until' string needs to be reversed before stringification, since the rest of the character list is in reverse order. * syntax-highlight/parsers.scm (parse-delimited): Reverse 'until' string when stringifying. --- syntax-highlight/parsers.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'syntax-highlight') diff --git a/syntax-highlight/parsers.scm b/syntax-highlight/parsers.scm index 2569b04..a1c3a37 100644 --- a/syntax-highlight/parsers.scm +++ b/syntax-highlight/parsers.scm @@ -187,7 +187,8 @@ Within the sequence, ESCAPE is recognized as the escape character." (loop rest (cons* head escape result))))) ((parse-until-maybe stream) => (lambda (remaining) - (stringify (append (string->list until) result) remaining))) + (stringify (append (reverse (string->list until)) result) + remaining))) (else (loop (stream-cdr stream) (cons (stream-car stream) result))))) (parse-fail stream)))))) -- cgit v1.2.3