Skip to content

Commit 02895f0

Browse files
committed
following the test-suite
1 parent 1ee853c commit 02895f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

csscolorparser.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ void parseRGB(const std::string& css_str, size_t pos, size_t end, bool& matched,
347347

348348
bool hasAlpha = match('a', css_str, pos, end);
349349

350+
skip_whitespace(css_str, pos, end);
351+
350352
if (!match('(', css_str, pos, end)) { return; }
351353

352354
float values[4] = { 0, 0, 0, 1 };
@@ -388,6 +390,8 @@ void parseHSL(const std::string& css_str, size_t pos, size_t end, bool& matched,
388390

389391
bool hasAlpha = match('a', css_str, pos, end);
390392

393+
skip_whitespace(css_str, pos, end);
394+
391395
if (!match('(', css_str, pos, end)) { return; }
392396

393397
float values[4] = { 0, 0, 0, 1 };

0 commit comments

Comments
 (0)