Add link for image file

* Render image tag with link tag on issue and wiki
* Correct response content-type of attached image on issue
This commit is contained in:
Tomofumi Tanaka
2014-05-03 00:56:36 +09:00
parent dc21e8388e
commit 619f72d929
3 changed files with 20 additions and 2 deletions

View File

@@ -89,7 +89,8 @@ class GitBucketHtmlSerializer(
) with LinkConverter with RequestCache {
override protected def printImageTag(imageNode: SuperNode, url: String): Unit =
printer.print("<img src=\"").print(fixUrl(url)).print("\" alt=\"").printEncoded(printChildrenToString(imageNode)).print("\"/>")
printer.print("<a target=\"_blank\" href=\"").print(fixUrl(url)).print("\">")
.print("<img src=\"").print(fixUrl(url)).print("\" alt=\"").printEncoded(printChildrenToString(imageNode)).print("\"/></a>")
override protected def printLink(rendering: LinkRenderer.Rendering): Unit = {
printer.print('<').print('a')