Skip to content
This repository has been archived by the owner on Jun 17, 2019. It is now read-only.

Commit

Permalink
Ignore special chars in wordtree highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
trivedigaurav committed Jul 22, 2015
1 parent dfaf3e1 commit 9a3f11f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,24 +394,24 @@ angular.module('myApp.controllers', [])
//report
backend.getReport(activeDoc).then(function(data) {
$scope.records.report.text = data.reportText;
$scope.records.report.exists = true;
$scope.records.report.exists = true;

//pathology
if (data.pathologyText) {
$scope.records.pathology.text = data.pathologyText;
$scope.records.pathology.exists = true;
}
//pathology
if (data.pathologyText) {
$scope.records.pathology.text = data.pathologyText;
$scope.records.pathology.exists = true;
}

backend.putLogEvent("getReport", activeDoc);
stopLoading();
$scope.feedbackText = null;
backend.putLogEvent("getReport", activeDoc);
stopLoading();
$scope.feedbackText = null;

//Highlight WordTree
if($scope.wordTreeData.spanText) {
//Highlight WordTree
if($scope.wordTreeData.spanText && $scope.tabs.docView) {
var search = $scope.wordTreeData.spanText.replace(/\s*\.$/, "");

search = search.replace(/[^\w\s]|_/g, function ($1) { return ' ' + $1 + ' ';})
.split(' ').join("[\\s\\'\\\"]*"); //Insert flexible spaces
.split(' ').join("[\\W]*"); //Insert flexible spaces

setTimeout(function() {
var range = rangy.createRange();
Expand Down

0 comments on commit 9a3f11f

Please sign in to comment.