Add Scaladoc

This commit is contained in:
Naoki Takezoe
2017-03-14 12:51:04 +09:00
parent 5b68ca1416
commit 5ac01a0617
2 changed files with 4 additions and 1 deletions

View File

@@ -44,7 +44,6 @@ object Markdown {
val renderer = new GitBucketMarkedRenderer(options, repository,
enableWikiLink, enableRefsLink, enableAnchor, enableTaskList, hasWritePermission, pages)
//helpers.decorateHtml(Marked.marked(source, options, renderer), repository)
Marked.marked(source, options, renderer)
}

View File

@@ -365,6 +365,10 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
decorateHtml(HtmlFormat.fill(out).toString, repository)
}
/**
* Decorate a given HTML by TextDecorators which are provided by plug-ins.
* TextDecorators are applied to only text parts of a given HTML.
*/
def decorateHtml(html: String, repository: RepositoryInfo)(implicit context: Context): String = {
PluginRegistry().getTextDecorators.foldLeft(html){ case (html, decorator) =>
val text = new StringBuilder()