diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-09-17 01:17:57 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-09-16 20:17:57 +0300 |
commit | 52e11b24bf5e395d83ea58c1b0fd6922efe16add (patch) | |
tree | f00c9da35c1f2afc3446b8607217e4d4315959ec /models/repo.go | |
parent | 911ca0215377b34559f2304a22dce863e219b255 (diff) | |
download | gitea-52e11b24bf5e395d83ea58c1b0fd6922efe16add.tar.gz gitea-52e11b24bf5e395d83ea58c1b0fd6922efe16add.zip |
Restructure markup & markdown to prepare for multiple markup languageā¦ (#2411)
* restructure markup & markdown to prepare for multiple markup languages support
* adjust some functions between markdown and markup
* fix tests
* improve the comments
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models/repo.go b/models/repo.go index 8d5b3b87c7..4b3b0322d6 100644 --- a/models/repo.go +++ b/models/repo.go @@ -22,7 +22,7 @@ import ( "code.gitea.io/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/markdown" + "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/options" "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/setting" @@ -480,10 +480,10 @@ func (repo *Repository) ComposeMetas() map[string]string { "repo": repo.Name, } switch unit.ExternalTrackerConfig().ExternalTrackerStyle { - case markdown.IssueNameStyleAlphanumeric: - repo.ExternalMetas["style"] = markdown.IssueNameStyleAlphanumeric + case markup.IssueNameStyleAlphanumeric: + repo.ExternalMetas["style"] = markup.IssueNameStyleAlphanumeric default: - repo.ExternalMetas["style"] = markdown.IssueNameStyleNumeric + repo.ExternalMetas["style"] = markup.IssueNameStyleNumeric } } @@ -708,7 +708,7 @@ func (repo *Repository) DescriptionHTML() template.HTML { sanitize := func(s string) string { return fmt.Sprintf(`<a href="%[1]s" target="_blank" rel="noopener">%[1]s</a>`, s) } - return template.HTML(descPattern.ReplaceAllStringFunc(markdown.Sanitize(repo.Description), sanitize)) + return template.HTML(descPattern.ReplaceAllStringFunc(markup.Sanitize(repo.Description), sanitize)) } // LocalCopyPath returns the local repository copy path |