Skip to content

Commit

Permalink
Restore camelcase urls
Browse files Browse the repository at this point in the history
  • Loading branch information
eternauta1337 committed Mar 6, 2017
1 parent f7146a9 commit f9ba51b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions awaydoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ handlebars.registerHelper('newLine', function () { return '\n'; });
app.renderer.theme.getUrls = function modGetURls(project) {
console.log("~awaydoc~ modifying theme.getUrls()");

// Reflection.getAlias() uses toLowerCase(),
// here, we state that we want the original class names as aliases.
function applyAlias(obj) {
if (obj.children) {
obj.children.forEach((child) => {
child._alias = child.name;
applyAlias(child);
});
}
}
applyAlias(project);

var origUrls = origGetUrls.call(this, project);

// Hardcode awayjs module urls.
Expand All @@ -94,18 +106,6 @@ handlebars.registerHelper('newLine', function () { return '\n'; });
return urlMapping;
});

// Reflection.getAlias() uses toLowerCase(),
// here, we state that we want the original class names as aliases.
function applyAlias(obj) {
if (obj.children) {
obj.children.forEach((child) => {
child._alias = child.name;
applyAlias(child);
});
}
}
applyAlias(project);

return modUrls;
}

Expand Down

0 comments on commit f9ba51b

Please sign in to comment.