mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 05:25:50 +01:00
Implementing Wiki part.
This commit is contained in:
@@ -18,6 +18,12 @@ object helpers {
|
||||
def format(value: String): twirl.api.Html = twirl.api.Html(
|
||||
value.replaceAll(" ", " ").replaceAll("\t", " ").replaceAll("\n", "<br>"))
|
||||
|
||||
def markdown(value: String): twirl.api.Html = {
|
||||
import org.pegdown._
|
||||
val html = new PegDownProcessor().markdownToHtml(value)
|
||||
twirl.api.Html(html)
|
||||
}
|
||||
|
||||
/**
|
||||
* Cut the given string by specified length.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user