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
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2019-07-19 19:37:35 +0300
committerBrett Walker <bwalker@gitlab.com>2019-07-19 20:40:16 +0300
commitb1694896ffd4dcf8bc54d19b5d513813e63d6121 (patch)
tree579b92050cc6ce6f01f83f9e8df5c6c7e39de885 /app/models/concerns/taskable.rb
parent2e56b134687ccc8043f14eef4c5d0bfa9e1fd370 (diff)
Properly identify task lists inside a blockquote
Updated the task list regex to understand blockquote characters that can come before the task item marker
Diffstat (limited to 'app/models/concerns/taskable.rb')
-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.