forked from forgejo/forgejo
Backport #26286 by @wxiaoguang
1. Allow leading and trailing spaces by user input, these spaces have
already been trimmed at backend
2. Allow using dots in the topic
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit fcd055c34a
)
This commit is contained in:
parent
db326835e6
commit
9e4be39acb
4 changed files with 5 additions and 3 deletions
|
@ -22,7 +22,7 @@ func init() {
|
|||
db.RegisterModel(new(RepoTopic))
|
||||
}
|
||||
|
||||
var topicPattern = regexp.MustCompile(`^[a-z0-9][a-z0-9-]*$`)
|
||||
var topicPattern = regexp.MustCompile(`^[a-z0-9][-.a-z0-9]*$`)
|
||||
|
||||
// Topic represents a topic of repositories
|
||||
type Topic struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue