Convert Markdown to HTML in the view by view.helpers.markdown().

This commit is contained in:
takezoe
2013-05-02 02:51:17 +09:00
parent d0716039fe
commit b2c6a0e24a
2 changed files with 3 additions and 5 deletions

View File

@@ -213,9 +213,7 @@ class RepositoryViewerController extends ControllerBase {
// process README.md
val readme = files.find(_.name == "README.md").map { file =>
import org.pegdown._
val git = Git.open(getRepositoryDir(owner, repository))
new PegDownProcessor().markdownToHtml(new String(git.getRepository.open(file.id).getBytes, "UTF-8"))
new String(JGitUtil.getContent(Git.open(getRepositoryDir(owner, repository)), file.id, true).get, "UTF-8")
}
html.files(