mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 14:05:52 +01:00
Small fix.
This commit is contained in:
@@ -52,7 +52,7 @@ class GitBucketLinkRender(context: app.Context, repository: service.RepositorySe
|
||||
}
|
||||
|
||||
class GitBucketVerbatimSerializer extends VerbatimSerializer {
|
||||
def serialize(node: VerbatimNode, printer: Printer) {
|
||||
def serialize(node: VerbatimNode, printer: Printer): Unit = {
|
||||
printer.println.print("<pre")
|
||||
if (!StringUtils.isEmpty(node.getType)) {
|
||||
printer.print(" class=").print('"').print("prettyprint ").print(node.getType).print('"')
|
||||
@@ -98,11 +98,11 @@ class GitBucketHtmlSerializer(
|
||||
}
|
||||
}
|
||||
|
||||
private def printAttribute(name: String, value: String) {
|
||||
private def printAttribute(name: String, value: String): Unit = {
|
||||
printer.print(' ').print(name).print('=').print('"').print(value).print('"')
|
||||
}
|
||||
|
||||
override def visit(node: TextNode) {
|
||||
override def visit(node: TextNode): Unit = {
|
||||
// convert commit id and username to link.
|
||||
val text = if(enableRefsLink) convertRefsLinks(node.getText, repository, "issue:") else node.getText
|
||||
|
||||
|
||||
@@ -31,9 +31,8 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
|
||||
* Converts Markdown of Wiki pages to HTML.
|
||||
*/
|
||||
def markdown(value: String, repository: service.RepositoryService.RepositoryInfo,
|
||||
enableWikiLink: Boolean, enableRefsLink: Boolean)(implicit context: app.Context): Html = {
|
||||
enableWikiLink: Boolean, enableRefsLink: Boolean)(implicit context: app.Context): Html =
|
||||
Html(Markdown.toHtml(value, repository, enableWikiLink, enableRefsLink))
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <img> which displays the avatar icon.
|
||||
@@ -81,14 +80,12 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
|
||||
/**
|
||||
* Generates the url to the account page.
|
||||
*/
|
||||
def url(userName: String)(implicit context: app.Context): String =
|
||||
s"${context.path}/${userName}"
|
||||
def url(userName: String)(implicit context: app.Context): String = s"${context.path}/${userName}"
|
||||
|
||||
/**
|
||||
* Returns the url to the root of assets.
|
||||
*/
|
||||
def assets(implicit context: app.Context): String =
|
||||
s"${context.path}/assets"
|
||||
def assets(implicit context: app.Context): String = s"${context.path}/assets"
|
||||
|
||||
def isPast(date: Date): Boolean = System.currentTimeMillis > date.getTime
|
||||
|
||||
|
||||
Reference in New Issue
Block a user