Skip to content

Commit

Permalink
Fix for site documentation with doc numbers > 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
larzconwell committed Oct 18, 2012
1 parent 25270fd commit c9770ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/template/index.js
Expand Up @@ -141,15 +141,15 @@ Templater.prototype.partial = function (partialURL, renderContextParam, parentNo
};

// Return the file name for a path
getFileName = function (path) {
return path.split('/').pop();
getFileName = function (p) {
return p.split('/').pop();
};

// Return the first parent for a path
getDirName = function (path) {
path = path.split('/');
path.pop();
return path.join('/');
getDirName = function (p) {
p = p.split('/');
p.pop();
return p.join('/');
};

// Return the template object for a template from geddy's template registry
Expand Down
4 changes: 2 additions & 2 deletions site/app/controllers/main.js
Expand Up @@ -91,7 +91,7 @@ var Main = function () {
}

var content = (resp.content) ? new Buffer(resp.content, 'base64').toString('utf8') : ''
, name = paths[i].path.replace('.md','')
, name = paths[i].path.replace('.md','').split('-')
, subs = []
, lines = content.split('\n');
for (var l in lines) {
Expand All @@ -100,7 +100,7 @@ var Main = function () {
}
}
docs[parseInt(name[0]) - 1] = {
name: name.split('-')[1]
name: name[1]
, content: md(content)
, subs: subs
};
Expand Down

0 comments on commit c9770ec

Please sign in to comment.