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 {
|
class GitBucketVerbatimSerializer extends VerbatimSerializer {
|
||||||
def serialize(node: VerbatimNode, printer: Printer) {
|
def serialize(node: VerbatimNode, printer: Printer): Unit = {
|
||||||
printer.println.print("<pre")
|
printer.println.print("<pre")
|
||||||
if (!StringUtils.isEmpty(node.getType)) {
|
if (!StringUtils.isEmpty(node.getType)) {
|
||||||
printer.print(" class=").print('"').print("prettyprint ").print(node.getType).print('"')
|
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('"')
|
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.
|
// convert commit id and username to link.
|
||||||
val text = if(enableRefsLink) convertRefsLinks(node.getText, repository, "issue:") else node.getText
|
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.
|
* Converts Markdown of Wiki pages to HTML.
|
||||||
*/
|
*/
|
||||||
def markdown(value: String, repository: service.RepositoryService.RepositoryInfo,
|
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))
|
Html(Markdown.toHtml(value, repository, enableWikiLink, enableRefsLink))
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <img> which displays the avatar icon.
|
* 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.
|
* Generates the url to the account page.
|
||||||
*/
|
*/
|
||||||
def url(userName: String)(implicit context: app.Context): String =
|
def url(userName: String)(implicit context: app.Context): String = s"${context.path}/${userName}"
|
||||||
s"${context.path}/${userName}"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the url to the root of assets.
|
* Returns the url to the root of assets.
|
||||||
*/
|
*/
|
||||||
def assets(implicit context: app.Context): String =
|
def assets(implicit context: app.Context): String = s"${context.path}/assets"
|
||||||
s"${context.path}/assets"
|
|
||||||
|
|
||||||
def isPast(date: Date): Boolean = System.currentTimeMillis > date.getTime
|
def isPast(date: Date): Boolean = System.currentTimeMillis > date.getTime
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user