From 0a15912b0a6b861f598c5c5780fc6e9aed1abe17 Mon Sep 17 00:00:00 2001 From: bptato Date: Wed, 15 Dec 2021 18:32:42 +0100 Subject: Some parser fixes --- src/css/parser.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/css/parser.nim') 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: -- cgit 1.4.1-2-gfad0