Skip to content

Node.js based forum software built for the modern web

RUN "npm install" AFTER THIS GIT PULL!!

Julian Lam0ae4e311637e
diff --git a/package.json b/package.json
index bc67486e6b..422246b90b 100644
--- a/package.json
+++ b/package.json
@@ -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": {},
diff --git a/src/posts.js b/src/posts.js
index 35fdaa30a1..e66cd534e9 100644
--- a/src/posts.js
+++ b/src/posts.js
@@ -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])
diff --git a/src/topics.js b/src/topics.js
index ba8da84519..6f92688c0e 100644
--- a/src/topics.js
+++ b/src/topics.js
@@ -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