Commit 8c255d41 authored by Ujvari Gergely's avatar Ujvari Gergely

Bugfix for rebuildHighlightText()

It tried to apply regexps even when they were not set.
parent a21441aa
......@@ -712,10 +712,11 @@ class Annotation
$scope.toggle()
$scope.rebuildHighlightText = ->
$scope.model.$modelValue.highlightText = $scope.model.$modelValue.text
for regexp in annotator.text_regexp
$scope.model.$modelValue.highlightText =
$scope.model.$modelValue.highlightText.replace regexp, annotator.highlighter
if annotator.text_regexp?
$scope.model.$modelValue.highlightText = $scope.model.$modelValue.text
for regexp in annotator.text_regexp
$scope.model.$modelValue.highlightText =
$scope.model.$modelValue.highlightText.replace regexp, annotator.highlighter
class Editor
......
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