diff --git a/lib/ace/config.js b/lib/ace/config.js index 94e9465f..6116da96 100644 --- a/lib/ace/config.js +++ b/lib/ace/config.js @@ -81,6 +81,10 @@ exports.moduleUrl = function(name, component) { // todo make this configurable or get rid of '-' var sep = component == "snippets" ? "/" : "-"; var base = parts[parts.length - 1]; + if (component == "worker" && sep == "-") { + var re = new RegExp("^" + component + "[\\-_]|[\\-_]" + component + "$", "g"); + base = base.replace(re, ""); + } if ((!base || base == component) && parts.length > 1) base = parts[parts.length - 2];