RUN "npm install" AFTER THIS GIT PULL!!

Integrated markdown parsing to all post content. Title content by default
not going to be parsed, using default options unless circumstances dictate
otherwise.
This commit is contained in:
Julian Lam
2013-05-02 20:35:42 -04:00
parent ad2021df04
commit 0ae4e31163
3 changed files with 6 additions and 4 deletions

View File

@@ -23,7 +23,8 @@
"passport-twitter": "0.1.4",
"passport-google-oauth": "0.1.5",
"passport-facebook": "0.1.5",
"less-middleware": "0.1.11"
"less-middleware": "0.1.11",
"marked": "0.2.8"
},
"devDependencies": {},
"optionalDependencies": {},

View File

@@ -1,5 +1,6 @@
var RDB = require('./redis.js'),
utils = require('./utils.js');
utils = require('./utils.js'),
marked = require('marked');
(function(Posts) {
//data structure
@@ -41,7 +42,7 @@ var RDB = require('./redis.js'),
var posts = [];
for (var i=0, ii=content.length; i<ii; i++) {
posts.push({
'content' : content[i],
'content' : marked(content[i]),
'uid' : uid[i],
'timestamp' : timestamp[i],
'relativeTime': utils.relativeTime(timestamp[i])

View File

@@ -26,7 +26,7 @@ var RDB = require('./redis.js'),
posts.get(function(data) {
topic_body = topic_body.parse(data);
callback(topic_body);
}, tid, start, end)
}, tid, start, end);
};
// this needs to move into forum.js