diff options
author | Vinnie Okada <vokada@mrvinn.com> | 2015-03-21 08:45:28 -0600 |
---|---|---|
committer | Vinnie Okada <vokada@mrvinn.com> | 2015-03-21 08:45:28 -0600 |
commit | 1dc90fc455249fb95a47c4abe37c41caeb2ec7da (patch) | |
tree | b526b87164f9975c827ec4f24f99a9c27456ac8f /app/models/concerns/taskable.rb | |
parent | c6dd117c71a326a09a1e6d546d6d0c98a21e3f1d (diff) | |
download | gitlab-ce-1dc90fc455249fb95a47c4abe37c41caeb2ec7da.tar.gz |
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.
Diffstat (limited to 'app/models/concerns/taskable.rb')
-rw-r--r-- | app/models/concerns/taskable.rb | 2 |
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 |