changeset 751:a4dfe2cebc7c

refactor Css_parse_simple_selector() a bit
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Sun, 11 Jan 2009 20:59:28 +0100
parents 0f34d430a80b
children 7c51158d1466
files src/cssparser.cc
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cssparser.cc	Sun Jan 11 17:03:51 2009 +0100
+++ b/src/cssparser.cc	Sun Jan 11 20:59:28 2009 +0100
@@ -983,8 +983,11 @@
       Css_next_token(parser);
       if (parser->space_separated)
          return true;
-   } else if (parser->ttype == CSS_TK_CHAR && parser->tval[0] != '#' &&
-              parser->tval[0] != '.' && parser->tval[0] != ':') {
+   } else if (parser->ttype == CSS_TK_CHAR && 
+              (parser->tval[0] == '#' ||
+               parser->tval[0] == '.' ||
+               parser->tval[0] == ':')) {
+   } else {
       return false;
    }