Markdown support for Comments

This commit is contained in:
Suraj Patil 2016-06-01 09:48:57 +05:30
parent 53aa6b9886
commit 40c2e2cf90
1 changed files with 1 additions and 0 deletions

View File

@ -342,6 +342,7 @@ func GetComments(username string) (map[int][]types.Comment, error) {
defer rows.Close() defer rows.Close()
for rows.Next() { for rows.Next() {
err := rows.Scan(&comment.ID, &taskID, &comment.Content, &created, &comment.Username) err := rows.Scan(&comment.ID, &taskID, &comment.Content, &created, &comment.Username)
comment.Content = string(md.Markdown([]byte(comment.Content)))
if err != nil { if err != nil {
return commentMap, err return commentMap, err
} }