@@ -58,7 +58,7 @@ trait GistControllerBase extends ControllerBase {
5858 val files = getGistFiles(userName, repoName)
5959 val (fileName, source) = files.head
6060
61- (gist, GistInfo (fileName, getLines(source), files.length, getForkedCount(userName, repoName), getCommentCount(userName, repoName)))
61+ (gist, GistInfo (fileName, getLines(fileName, source), files.length, getForkedCount(userName, repoName), getCommentCount(userName, repoName)))
6262 }
6363
6464 html.list(None , gists, page, page * Limit < count)
@@ -351,8 +351,9 @@ trait GistControllerBase extends ControllerBase {
351351 val repoName = params(" repoName" )
352352
353353 contentType = " text/html"
354- helpers.markdown(params(" content" ),
355- RepositoryInfo (
354+ helpers.markdown(
355+ markdown = params(" content" ),
356+ repository = RepositoryInfo (
356357 owner = userName,
357358 name = repoName,
358359 repository = null ,
@@ -362,7 +363,13 @@ trait GistControllerBase extends ControllerBase {
362363 branchList = Nil ,
363364 tags = Nil ,
364365 managers = Nil
365- ), false , false , false , false )
366+ ),
367+ branch = " master" ,
368+ enableWikiLink = false ,
369+ enableRefsLink = false ,
370+ enableLineBreaks = false ,
371+ enableAnchor = false
372+ )
366373 }
367374
368375 post(" /gist/:userName/:repoName/_comment" , commentForm)(usersOnly { form =>
@@ -399,7 +406,15 @@ trait GistControllerBase extends ControllerBase {
399406 } getOrElse {
400407 contentType = formats(" json" )
401408 org.json4s.jackson.Serialization .write(
402- Map (" content" -> gitbucket.core.view.Markdown .toHtml(comment.content, gist.toRepositoryInfo, false , true , true , true ))
409+ Map (" content" -> gitbucket.core.view.Markdown .toHtml(
410+ markdown = comment.content,
411+ repository = gist.toRepositoryInfo,
412+ branch = " master" ,
413+ enableWikiLink = false ,
414+ enableRefsLink = true ,
415+ enableAnchor = true ,
416+ enableLineBreaks = true
417+ ))
403418 )
404419 }
405420 }
@@ -441,7 +456,7 @@ trait GistControllerBase extends ControllerBase {
441456 val repoName = gist.repositoryName
442457 val files = getGistFiles(userName, repoName, revision)
443458 val (fileName, source) = files.head
444- (gist, GistInfo (fileName, getLines(source), files.length, getForkedCount(userName, repoName), getCommentCount(userName, repoName)))
459+ (gist, GistInfo (fileName, getLines(fileName, source), files.length, getForkedCount(userName, repoName), getCommentCount(userName, repoName)))
445460 }
446461
447462 val fullName = getAccountByUserName(userName).get.fullName
0 commit comments