From 8f6009db363f9978f22826a413bbd0f7f0ddd2f9 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 7 May 2015 12:07:49 +0200 Subject: epub: Whitespace separated by comments turn into two whitespace tokens. Deal with it. --- source/html/css-parse.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/html/css-parse.c') diff --git a/source/html/css-parse.c b/source/html/css-parse.c index 59d305d4..f2faef4a 100644 --- a/source/html/css-parse.c +++ b/source/html/css-parse.c @@ -495,7 +495,8 @@ static void expect(struct lexbuf *buf, int t) static void white(struct lexbuf *buf) { - accept(buf, ' '); + while (buf->lookahead == ' ') + next(buf); } static int iscond(int t) @@ -873,7 +874,10 @@ static void parse_at_rule(struct lexbuf *buf) while (buf->lookahead != EOF) { if (accept(buf, ';')) + { + white(buf); return; + } if (accept(buf, '{')) { int depth = 1; @@ -886,6 +890,7 @@ static void parse_at_rule(struct lexbuf *buf) else next(buf); } + white(buf); return; } next(buf); -- cgit v1.2.3