summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2019-07-19 11:37:35 -0500
committerBrett Walker <bwalker@gitlab.com>2019-07-19 12:40:16 -0500
commitb1694896ffd4dcf8bc54d19b5d513813e63d6121 (patch)
tree579b92050cc6ce6f01f83f9e8df5c6c7e39de885 /app/models
parent2e56b134687ccc8043f14eef4c5d0bfa9e1fd370 (diff)
downloadgitlab-ce-b1694896ffd4dcf8bc54d19b5d513813e63d6121.tar.gz
Properly identify task lists inside a blockquote64697-markdown-issues-checkbox-inside-blockquote-status-won-t-be-saved
Updated the task list regex to understand blockquote characters that can come before the task item marker
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/taskable.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/concerns/taskable.rb b/app/models/concerns/taskable.rb
index b42adad94ba..8b536a123fc 100644
--- a/app/models/concerns/taskable.rb
+++ b/app/models/concerns/taskable.rb
@@ -15,7 +15,8 @@ module Taskable
INCOMPLETE_PATTERN = /(\[[\s]\])/.freeze
ITEM_PATTERN = %r{
^
- \s*(?:[-+*]|(?:\d+\.)) # list prefix required - task item has to be always in a list
+ (?:(?:>\s{0,4})*) # optional blockquote characters
+ \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.