Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Conversation

ja-my-github
Copy link

Left: Backslash not recognized.
Right: Fixed.

fixskyhighlight

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 4b8f589
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/348375558

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 4b3815f
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/348822369

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 3408a04
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/348828226

(Please note that this is a fully automated comment.)

@Blackbaud-SteveBrush
Copy link
Member

#1494

@@ -27,11 +27,16 @@ export class SkyTextHighlightDirective

private static getRegexMatch(node: HTMLElement, searchText: string): RegExpExecArray {
const text = node.nodeValue;
const searchRegex = new RegExp(searchText, 'gi');

const newSearchText = this.addBackSlash(searchText);
Copy link
Member

@Blackbaud-SteveBrush Blackbaud-SteveBrush Mar 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joelamora: This works great! Instead of creating the separate method, mind implementing inline?

const text = node.nodeValue;
// Escape the backslash character:
searchText = searchText.replace(/\\/g, '\\\\');
const searchRegex = new RegExp(newSearchText, 'gi');
...

Thank you!

@Blackbaud-SteveBrush
Copy link
Member

I'm approving this, but I'm going to make a note that we should include a unit test before release. @joelamora If you have the time, it would be appreciated. Otherwise, we'll take care of it this week!

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: edca472
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/352358538

(Please note that this is a fully automated comment.)

@codecov-io
Copy link

codecov-io commented Mar 13, 2018

Codecov Report

Merging #1513 into contrib-fix-sky-highlight-backslash will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@                         Coverage Diff                         @@
##           contrib-fix-sky-highlight-backslash   #1513   +/-   ##
===================================================================
  Coverage                                  100%    100%           
===================================================================
  Files                                      387     387           
  Lines                                     7568    7569    +1     
  Branches                                   970     970           
===================================================================
+ Hits                                      7568    7569    +1
Impacted Files Coverage Δ
...modules/text-highlight/text-highlight.directive.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6968644...b77f6fd. Read the comment docs.

@Blackbaud-SteveBrush Blackbaud-SteveBrush changed the base branch from master to contrib-fix-sky-highlight-backslash March 13, 2018 17:11
@Blackbaud-SteveBrush Blackbaud-SteveBrush merged commit 57423d1 into blackbaud:contrib-fix-sky-highlight-backslash Mar 13, 2018
@blackbaud-sky-savage
Copy link
Collaborator

Tests passed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED

Commit: b77f6fd
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/352948085

(Please note that this is a fully automated comment.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants