Commit 9b45f27c74ccea198c09ab917f83735ec88a70a2

Thomas de Grivel 2018-06-14T01:37:20

fix match-string

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/css-lexer.lisp b/css-lexer.lisp
index 417dffa..6a63d8b 100644
--- a/css-lexer.lisp
+++ b/css-lexer.lisp
@@ -207,9 +207,9 @@
 
 (defmethod match-string ((lx lexer) (end-char character))
   (match-sequence lx
-    (match lx end-char)
-    (match-times lx (lambda (lx) (match-string-char lx end-char)) 0 nil)
-    (match lx end-char)))
+    (and (match lx end-char)
+         (match-times lx (lambda (lx) (match-string-char lx end-char)) 0 nil)
+         (match lx end-char))))
 
 (defmethod string-token ((lx lexer))
   (push-token lx)