From 04943d8f63b2f486a0f732d42c474c3bf3ac9884 Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Fri, 1 Jan 2021 15:17:50 +0100 Subject: [PATCH] Use simplified argument list parser --- Sources/LibMakeColors/Model/Scanner+ColorParser.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/LibMakeColors/Model/Scanner+ColorParser.swift b/Sources/LibMakeColors/Model/Scanner+ColorParser.swift index c0d54d2..d114d4a 100644 --- a/Sources/LibMakeColors/Model/Scanner+ColorParser.swift +++ b/Sources/LibMakeColors/Model/Scanner+ColorParser.swift @@ -19,11 +19,11 @@ extension Scanner { } } - if string("rgba"), string("("), let components = commaSeparated(), components.count == 4, string(")") { + if string("rgba"), let components = argumentList(4) { return Color(components) } - if string("rgb"), string("("), let components = commaSeparated(), components.count == 3, string(")") { + if string("rgb"), let components = argumentList(3) { return Color(components) }