mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-18 08:08:31 +00:00
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>
This commit is contained in:
parent
a57568bad7
commit
fcd055c34a
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