do not assume module names have three parts
This commit is contained in:
parent
4666af6288
commit
445767a598
2 changed files with 5 additions and 5 deletions
|
|
@ -395,7 +395,7 @@ function buildAce(options) {
|
|||
'ace/lib/fixoldbrowsers',
|
||||
'ace/lib/event_emitter',
|
||||
'ace/lib/oop',
|
||||
'ace/worker/' + mode
|
||||
'ace/mode/' + mode + '_worker'
|
||||
]
|
||||
}],
|
||||
filter: filters,
|
||||
|
|
|
|||
|
|
@ -77,11 +77,11 @@ exports.moduleUrl = function(name, component) {
|
|||
return options.$moduleUrls[name];
|
||||
|
||||
var parts = name.split("/");
|
||||
component = component || parts[1];
|
||||
var base = parts[2].replace(component, "").replace(/(^[\-_])|([\-_]$)/, "");
|
||||
component = component || parts[parts.length - 2] || "";
|
||||
var base = parts[parts.length - 1].replace(component, "").replace(/(^[\-_])|([\-_]$)/, "");
|
||||
|
||||
if (!base)
|
||||
base = parts[1];
|
||||
if (!base && parts.length > 1)
|
||||
base = parts[parts.length - 2];
|
||||
return this.get(component + "Path") + "/" + component + "-" + base + this.get("suffix");
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue