Commit a7be8636 authored by Ujvari Gergely's avatar Ujvari Gergely

fix: last commit was not a complete fix

parent acf6798d
......@@ -447,22 +447,20 @@ class Search
if children?
for child in children
if child.id in $scope.search_filter
child.highlightText = child.text
hit_in_children = true
if $routeParams.in_body_text and
child.text.toLowerCase().indexOf($routeParams.in_body_text) > -1
#Add highlight
child.highlightText = child.text.replace $scope.text_regexp, $scope.highlighter
else
child.highlightText = child.text
unless annotation.id in $scope.search_filter or hit_in_children
continue
if $routeParams.whole_document or annotation in $scope.annotations
annotation.highlightText = annotation.text
if $routeParams.in_body_text and
annotation.text.toLowerCase().indexOf($routeParams.in_body_text) > -1
#Add highlight
annotation.highlightText = annotation.text.replace $scope.text_regexp, $scope.highlighter
else
annotation.highlightText = annotation.text
threads.push thread
$scope.threads = threads
#Replace this with threading call
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment