[fbreader] Ignore AT-rules like @charset "utf-8";

This commit is contained in:
Slava Monich 2018-07-27 01:16:48 +03:00
parent 883110810e
commit bb587bd397

View file

@ -1,6 +1,6 @@
/* /*
* Copyright (C) 2004-2010 Geometer Plus <contact@geometerplus.com> * Copyright (C) 2004-2010 Geometer Plus <contact@geometerplus.com>
* Copyright (C) 2015-2017 Slava Monich <slava.monich@jolla.com> * Copyright (C) 2015-2018 Slava Monich <slava.monich@jolla.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -187,6 +187,11 @@ void StyleSheetParser::processChar4(char c) {
} }
myWord.resize(0); myWord.resize(0);
break; break;
case ';':
// Probably AT-rule, e.g. @charset "utf-8";
mySelectors.resize(0);
myWord.resize(0);
break;
default: default:
if (!isspace(c) || !myWord.empty()) { if (!isspace(c) || !myWord.empty()) {
myWord.append(1, c); myWord.append(1, c);