Skip to content

Commit

Permalink
Use util.format
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Aug 16, 2012
1 parent 51752a4 commit c605d02
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/directory.js
Expand Up @@ -82,7 +82,7 @@ var page = [
'%s',
'</table>',
'<hr />',
'<address>Strata/' + strata.version.join(".") + '</address>',
'<address>%s/%s</address>',
'</body>',
'</html>'
].join("\n");
Expand Down Expand Up @@ -133,7 +133,9 @@ function generateListing(env, callback, root, pathInfo, scriptName) {
});

var title = "Index of " + pathInfo;
var content = util.format(page, title, title, rows);
var name = "Strata";
var version = strata.version.join(".");
var content = util.format(page, title, title, rows, name, version);

callback(200, {
"Content-Type": "text/html",
Expand Down
10 changes: 10 additions & 0 deletions lib/manual/section.js
@@ -0,0 +1,10 @@
module.exports = Section;

function Section(name) {
this.name = name;
this.chapters = [];
}

Section.prototype.addChapter = function (chapter) {
this.chapters.push(chapter);
};

0 comments on commit c605d02

Please sign in to comment.