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-02-07 23:51:11 +0300
committerBrett Walker <bwalker@gitlab.com>2019-02-08 22:16:43 +0300
commit01835ef048ca2a22075deaa7ff0cae3b94254193 (patch)
treef78f4eb2c40ea0bf70288ee3787a663f49296a9a /app/services/task_list_toggle_service.rb
parent82423ac34ac90e3ff3443495a14af0105feff67d (diff)
Optimize the compare of the task lines
Diffstat (limited to 'app/services/task_list_toggle_service.rb')
-rw-r--r--app/services/task_list_toggle_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/task_list_toggle_service.rb b/app/services/task_list_toggle_service.rb
index cfe187d9b12..af24bc0524c 100644
--- a/app/services/task_list_toggle_service.rb
+++ b/app/services/task_list_toggle_service.rb
@@ -33,7 +33,7 @@ class TaskListToggleService
markdown_task = source_lines[source_line_index]
# The source in the DB could be using either \n or \r\n line endings
- return unless markdown_task == line_source || markdown_task == line_source + "\r"
+ return unless markdown_task.chomp == line_source
return unless source_checkbox = Taskable::ITEM_PATTERN.match(markdown_task)
currently_checked = TaskList::Item.new(source_checkbox[1]).complete?