about summary refs log tree commit diff stats
path: root/src/css/parser.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-12-15 18:32:42 +0100
committerbptato <nincsnevem662@gmail.com>2021-12-15 18:37:48 +0100
commit0a15912b0a6b861f598c5c5780fc6e9aed1abe17 (patch)
tree82b79efdecf46babfe1b6e634c1ba8414557cf46 /src/css/parser.nim
parent7458264e02c0b802cd73d8a4256a4226d1e7e35c (diff)
downloadchawan-0a15912b0a6b861f598c5c5780fc6e9aed1abe17.tar.gz
Some parser fixes
Diffstat (limited to 'src/css/parser.nim')
-rw-r--r--src/css/parser.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/css/parser.nim b/src/css/parser.nim
index 2fdefef2..b594abc3 100644
--- a/src/css/parser.nim
+++ b/src/css/parser.nim
@@ -286,7 +286,7 @@ proc consumeURL(state: var CSSTokenizerState): CSSToken =
 
 proc consumeIdentLikeToken(state: var CSSTokenizerState): CSSToken =
   let s = state.consumeName()
-  if s.toAsciiLower() == "url" and state.has() and state.curr() == Rune('('):
+  if s.equalsIgnoreCase("url") and state.has() and state.curr() == Rune('('):
     discard state.consume()
     while state.has(1) and state.curr().isWhitespace() and state.peek(1).isWhitespace():
       discard state.consume()
@@ -516,7 +516,7 @@ proc consumeDeclaration(state: var CSSParseState): Option[CSSDeclaration] =
     if decl.value[i] != CSS_WHITESPACE_TOKEN:
       dec j
       if decl.value[i] == CSS_IDENT_TOKEN and k == 0:
-        if CSSToken(decl.value[i]).value.toAsciiLower() == "important":
+        if CSSToken(decl.value[i]).value.equalsIgnoreCase("important"):
           inc k
           l = i
       elif k == 1 and decl.value[i] == CSS_DELIM_TOKEN: