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
This commit is contained in:
2017-09-17 01:17:57 +08:00
committed by Lauris BH
parent 911ca02153
commit 52e11b24bf
19 changed files with 1206 additions and 1109 deletions

View File

@ -16,7 +16,7 @@ import (
api "code.gitea.io/sdk/gitea"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/markdown"
"code.gitea.io/gitea/modules/markup"
)
// CommentType defines whether a comment is just a simple comment, an action (like close) or a reference.
@ -272,7 +272,7 @@ func (c *Comment) LoadAssignees() error {
// MailParticipants sends new comment emails to repository watchers
// and mentioned people.
func (c *Comment) MailParticipants(e Engine, opType ActionType, issue *Issue) (err error) {
mentions := markdown.FindAllMentions(c.Content)
mentions := markup.FindAllMentions(c.Content)
if err = UpdateIssueMentions(e, c.IssueID, mentions); err != nil {
return fmt.Errorf("UpdateIssueMentions [%d]: %v", c.IssueID, err)
}