diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-01-26 13:47:32 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-01-26 13:47:32 +0300 |
commit | c02f0808a2de9d8a2baa175280126cb0399103dd (patch) | |
tree | e487b2e6b0c1a17ac2bc69734e4f3c2826731ce1 /app | |
parent | ac6e202f46de232afd5c319e02be5f0bf9793177 (diff) | |
parent | 816fad3530d3d9774733c4fa215d43b9b06a1f95 (diff) |
Merge branch '26068_tasklist_issue' into 'master'
don’t count tasks that are not defined as list items correctly
Closes #26068
See merge request !8526
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/taskable.rb | 8 |
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) |