From c1c269d9ef50595475cf4c6728d9b20a6417c490 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 31 Mar 2017 15:29:43 -0400 Subject: modules: rename markdown -> markup To further support more markup languages (e.g. Org-mode, AsciiDoc, reStructuredText), the name 'markdown' is inappropriate. This is the first step towards more markup language support. --- modules/template/template.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/template/template.go') diff --git a/modules/template/template.go b/modules/template/template.go index acdfab8d..0bd5fa3f 100644 --- a/modules/template/template.go +++ b/modules/template/template.go @@ -23,7 +23,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/markdown" + "github.com/gogits/gogs/modules/markup" "github.com/gogits/gogs/modules/setting" ) @@ -125,7 +125,7 @@ func Safe(raw string) template.HTML { } func Str2html(raw string) template.HTML { - return template.HTML(markdown.Sanitizer.Sanitize(raw)) + return template.HTML(markup.Sanitizer.Sanitize(raw)) } func List(l *list.List) chan interface{} { @@ -201,7 +201,7 @@ func ReplaceLeft(s, old, new string) string { // RenderCommitMessage renders commit message with XSS-safe and special links. func RenderCommitMessage(full bool, msg, urlPrefix string, metas map[string]string) template.HTML { cleanMsg := template.HTMLEscapeString(msg) - fullMessage := string(markdown.RenderIssueIndexPattern([]byte(cleanMsg), urlPrefix, metas)) + fullMessage := string(markup.RenderIssueIndexPattern([]byte(cleanMsg), urlPrefix, metas)) msgLines := strings.Split(strings.TrimSpace(fullMessage), "\n") numLines := len(msgLines) if numLines == 0 { -- cgit v1.2.3