From 99772a9ac81d8d227c0621f0ec8f0b529423e824 Mon Sep 17 00:00:00 2001 From: Roman Yurchak Date: Wed, 22 Aug 2018 17:35:40 +0300 Subject: [PATCH] Case insensitive packages / URLs --- src/pyodide.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pyodide.js b/src/pyodide.js index 910b98907..3a28862ec 100644 --- a/src/pyodide.js +++ b/src/pyodide.js @@ -3,10 +3,10 @@ */ // Regexp for validating package name and URI -var package_name_regexp = '[a-zA-Z0-9_\-]+' +var package_name_regexp = '[a-z0-9_\-]+' var package_uri_regexp = new RegExp( - '^https?://.*?(' + package_name_regexp + ').js$'); -var package_name_regexp = new RegExp('^' + package_name_regexp + '$'); + '^https?://.*?(' + package_name_regexp + ').js$', 'i'); +var package_name_regexp = new RegExp('^' + package_name_regexp + '$', 'i'); var languagePluginLoader = new Promise((resolve, reject) => {