summaryrefslogtreecommitdiffstats
path: root/models/issues
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-11-02 11:42:02 +0100
committerGitHub <noreply@github.com>2023-11-02 11:42:02 +0100
commit4776fde9e1caa7cee5671715144a668e19a0323c (patch)
treeef8bf9edcb596acf81ee9a3a23233200aad743fd /models/issues
parentdc52f26d46f12b7e3c647bec3514e6c66684a3af (diff)
downloadgitea-4776fde9e1caa7cee5671715144a668e19a0323c.tar.gz
gitea-4776fde9e1caa7cee5671715144a668e19a0323c.zip
Display issue task list on project cards (#27865)
Display the issue task list on project cards. ![grafik](https://github.com/go-gitea/gitea/assets/1666336/e6cb3196-8980-403c-9795-3a7b03fbfb3c) Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'models/issues')
-rw-r--r--models/issues/issue.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/models/issues/issue.go b/models/issues/issue.go
index 8655b9de3f..b0ff0adddd 100644
--- a/models/issues/issue.go
+++ b/models/issues/issue.go
@@ -142,22 +142,14 @@ type Issue struct {
}
var (
- issueTasksPat *regexp.Regexp
- issueTasksDonePat *regexp.Regexp
-)
-
-const (
- issueTasksRegexpStr = `(^\s*[-*]\s\[[\sxX]\]\s.)|(\n\s*[-*]\s\[[\sxX]\]\s.)`
- issueTasksDoneRegexpStr = `(^\s*[-*]\s\[[xX]\]\s.)|(\n\s*[-*]\s\[[xX]\]\s.)`
+ issueTasksPat = regexp.MustCompile(`(^\s*[-*]\s\[[\sxX]\]\s.)|(\n\s*[-*]\s\[[\sxX]\]\s.)`)
+ issueTasksDonePat = regexp.MustCompile(`(^\s*[-*]\s\[[xX]\]\s.)|(\n\s*[-*]\s\[[xX]\]\s.)`)
)
// IssueIndex represents the issue index table
type IssueIndex db.ResourceIndex
func init() {
- issueTasksPat = regexp.MustCompile(issueTasksRegexpStr)
- issueTasksDonePat = regexp.MustCompile(issueTasksDoneRegexpStr)
-
db.RegisterModel(new(Issue))
db.RegisterModel(new(IssueIndex))
}