From 9709923ba132161fe38b141d6f7b36df25932eb9 Mon Sep 17 00:00:00 2001 From: Viet Hoang <1300077+vietqhoang@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:33:05 +0900 Subject: [PATCH] Just use the optional character option --- lib/importmap/packager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/importmap/packager.rb b/lib/importmap/packager.rb index 726ae25..237b9b6 100644 --- a/lib/importmap/packager.rb +++ b/lib/importmap/packager.rb @@ -70,7 +70,7 @@ def pin_options_for_package(package) return {} if raw_options.blank? - raw_options[:pin_options].split(/,\s|,/).each_with_object({}) do |option, hash| + raw_options[:pin_options].split(/,\s?/).each_with_object({}) do |option, hash| match_data = option.match(/^(?[^:]*):[\s+]?["']?(?.*[^"'])["']?$/) hash[match_data[:option_name]] = cast_option_value(match_data[:option_value])