forked from OrgGo/Tasks
Markdown support for Comments
This commit is contained in:
parent
53aa6b9886
commit
40c2e2cf90
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue