summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-24 20:57:35 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-24 20:57:35 +0000
commitb8ad3647ad99a64ffc6296883aa8135d462dd17b (patch)
tree52b01f122b014724783ce7f31761296e9d0f76c2 /app
parentc3c9703437a552700c2a6ca010b05cc56aa6d73a (diff)
parentb7ed7d05a0b2aab9123c101a1a0558ae0f9bf7cc (diff)
downloadgitlab-ce-b8ad3647ad99a64ffc6296883aa8135d462dd17b.tar.gz
Merge branch 'fix-nested-tasks' into 'master'
Fix nested task lists When nesting task list items, the parent item is wrapped in a `<p>` tag. Update the task list parser to handle these paragraph wrappers. cc @sytse See merge request !413
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/taskable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/taskable.rb b/app/models/concerns/taskable.rb
index 410e8dc820b..bbb3b301a9f 100644
--- a/app/models/concerns/taskable.rb
+++ b/app/models/concerns/taskable.rb
@@ -5,7 +5,7 @@
# Used by MergeRequest and Issue
module Taskable
TASK_PATTERN_MD = /^(?<bullet> *[*-] *)\[(?<checked>[ xX])\]/.freeze
- TASK_PATTERN_HTML = /^<li>\[(?<checked>[ xX])\]/.freeze
+ TASK_PATTERN_HTML = /^<li>(?<p_tag>\s*<p>)?\[(?<checked>[ xX])\]/.freeze
# Change the state of a task list item for this Taskable. Edit the object's
# description by finding the nth task item and changing its checkbox