Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-01-25 10:24:14 +0300
committerJarka Kadlecova <jarka@gitlab.com>2017-01-25 22:54:11 +0300
commit816fad3530d3d9774733c4fa215d43b9b06a1f95 (patch)
treeb702de1b7ac2120370710307280ec55d58ccc749 /app
parent94715834cef03ab5e7bda0bb558a650f39d41e94 (diff)
Don’t count tasks that are not defined as list items correctly
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/taskable.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/concerns/taskable.rb b/app/models/concerns/taskable.rb
index 68385dc47eb..25e2d8ea24e 100644
--- a/app/models/concerns/taskable.rb
+++ b/app/models/concerns/taskable.rb
@@ -11,10 +11,10 @@ module Taskable
INCOMPLETE = 'incomplete'.freeze
ITEM_PATTERN = /
^
- \s*(?:[-+*]|(?:\d+\.))? # optional list prefix
- \s* # optional whitespace prefix
- (\[\s\]|\[[xX]\]) # checkbox
- (\s.+) # followed by whitespace and some text.
+ \s*(?:[-+*]|(?:\d+\.)) # list prefix required - task item has to be always in a list
+ \s+ # whitespace prefix has to be always presented for a list item
+ (\[\s\]|\[[xX]\]) # checkbox
+ (\s.+) # followed by whitespace and some text.
/x
def self.get_tasks(content)