diff options
author | Unknwon <u@gogs.io> | 2017-03-31 15:29:43 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-31 15:29:43 -0400 |
commit | c1c269d9ef50595475cf4c6728d9b20a6417c490 (patch) | |
tree | 287621c5244c9b11b6e980190fce9bb887d2bf1f /modules/template/template.go | |
parent | 9edac05e05387e335466957ecf3400a19c6ae808 (diff) |
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.
Diffstat (limited to 'modules/template/template.go')
-rw-r--r-- | modules/template/template.go | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |