Rename ProjectService to RepositoryService.

This commit is contained in:
takezoe
2013-06-04 01:14:27 +09:00
parent f9c085ced6
commit 78ad794613
7 changed files with 21 additions and 18 deletions

View File

@@ -25,7 +25,7 @@ object helpers {
/**
* Converts the issue number and the commit id to the link.
*/
private def markdownFilter(value: String, repository: service.ProjectService.RepositoryInfo)(implicit context: app.Context): String = {
private def markdownFilter(value: String, repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context): String = {
value
.replaceAll("#([0-9]+)", "[$0](%s/%s/%s/issue/$1)".format(context.path, repository.owner, repository.name))
.replaceAll("[0-9a-f]{40}", "[$0](%s/%s/%s/commit/$0)".format(context.path, repository.owner, repository.name))
@@ -34,7 +34,7 @@ object helpers {
/**
* Converts Markdown of Wiki pages to HTML.
*/
def markdown(value: String, repository: service.ProjectService.RepositoryInfo, wikiLink: Boolean)(implicit context: app.Context): twirl.api.Html = {
def markdown(value: String, repository: service.RepositoryService.RepositoryInfo, wikiLink: Boolean)(implicit context: app.Context): twirl.api.Html = {
import org.pegdown._
val html = new PegDownProcessor(Extensions.AUTOLINKS|Extensions.WIKILINKS|Extensions.FENCED_CODE_BLOCKS)
.markdownToHtml(markdownFilter(value, repository), new LinkRenderer(){