Added preview of the file "readme" like in github with using showdown.js parser (http://github.com/coreyti/showdown).

This commit is contained in:
Michał Prochowski
2012-06-13 01:53:34 +02:00
parent 3c26f08599
commit c6de3bb8c8
8 changed files with 125 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ $app->get('{repo}/', function($repo) use($app) {
'breadcrumbs' => $breadcrumbs,
'branches' => $repository->getBranches(),
'tags' => $repository->getTags(),
'readme' => $app['utils']->getReadme($repo),
));
})->assert('repo', '[\w-._]+');
@@ -35,6 +36,7 @@ $app->get('{repo}/tree/{branch}/', function($repo, $branch) use($app) {
'breadcrumbs' => $breadcrumbs,
'branches' => $repository->getBranches(),
'tags' => $repository->getTags(),
'readme' => $app['utils']->getReadme($repo, $branch),
));
})->assert('repo', '[\w-._]+')
->assert('branch', '[\w-._]+');