summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3fb1264)
raw | patch | inline | side by side (parent: 3fb1264)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 14 Mar 2007 23:55:00 +0000 (23:55 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 14 Mar 2007 23:55:00 +0000 (23:55 +0000) |
src/libcroco/cr-declaration.c | patch | blob | history |
index ba8e0c95fc53f4bf06d507b8c42ec9bc64f7a29d..530085b52cfdd394fe57df1a147adf267aaae8ba 100644 (file)
cr_parser_try_to_skip_spaces_and_comments (parser);
status = cr_tknzr_peek_char (tokenizer, &c);
if (status != CR_OK) {
- if (status == CR_END_OF_INPUT_ERROR)
+ if (status == CR_END_OF_INPUT_ERROR)
status = CR_OK;
goto cleanup;
}
if (c == ';') {
status = cr_tknzr_read_char (tokenizer, &c);
} else {
- break;
+ cr_tknzr_read_char (tokenizer, &c);
+ continue; // try to keep reading until we reach the end or a ;
}
important = FALSE;
cr_parser_try_to_skip_spaces_and_comments (parser);
&value, &important);
if (status != CR_OK || !property) {
if (status == CR_END_OF_INPUT_ERROR) {
- status = CR_OK;
- }
- break;
+ status = CR_OK; // simply the end of input, do not delete what we got so far, just finish
+ break;
+ } else {
+ continue; // even if one declaration is broken, it's no reason to discard others (see http://www.w3.org/TR/CSS21/syndata.html#declaration)
+ }
}
cur_decl = cr_declaration_new (NULL, property, value);
if (cur_decl) {