@@ -8,5 +8,5 @@ module.exports = form(
field('commentForm.revision_id').trim().required(),
field('commentForm.comment').trim().required(),
field('commentForm.comment_position').trim().toInt(),
- field('commentForm.is_markdown')
+ field('commentForm.is_markdown').trim().toBoolean()
);
@@ -62,7 +62,7 @@ module.exports = function(crowi, app) {
var revisionId = form.revision_id;
var comment = form.comment;
var position = form.comment_position || -1;
- var isMarkdown = form.is_markdown || 0;
+ var isMarkdown = form.is_markdown;
return Comment.create(pageId, req.user._id, revisionId, comment, position, isMarkdown)
.then(function(createdComment) {