accept string or array of strings for source url

This commit is contained in:
Mike Morris
2015-03-13 12:57:06 -04:00
parent f32f52f7a2
commit c0c0f2667b

View File

@@ -93,8 +93,15 @@ function renderTest(style, info, base, key) {
};
}
function rewriteLocalSchema(uri) {
return uri.replace(/^local:\/\//, '');
function rewriteLocalSchema(url) {
var regex = /^local:\/\//;
if (url instanceof Array) {
return url.map(function(str) {
return str.replace(regex, '');
});
} else if (url instanceof String) {
return url.replace(regex, '');
}
}
var tests;