Skip to content

Commit

Permalink
fix(factories): Only append remainder if the Apple-converted-space ha…
Browse files Browse the repository at this point in the history
…s matched
  • Loading branch information
Dan Nguyen committed Aug 19, 2016
1 parent 950ed2d commit e086974
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/textAngular.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ angular.module('textAngular.factories', [])
finalHtml += html.substring(lastIndex, match.index) + appleSpaceVal;
lastIndex = match.index + match[0].length;
}
finalHtml += html.substring(lastIndex);
/* istanbul ignore next: apple-contereted-space span has matched */
if (lastIndex) {
// modified....
finalHtml += html.substring(lastIndex);
html=finalHtml;
finalHtml='';
lastIndex=0;
Expand Down
2 changes: 1 addition & 1 deletion dist/textAngular.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/textAngular.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -1133,10 +1133,10 @@ angular.module('textAngular.factories', [])
finalHtml += html.substring(lastIndex, match.index) + appleSpaceVal;
lastIndex = match.index + match[0].length;
}
finalHtml += html.substring(lastIndex);
/* istanbul ignore next: apple-contereted-space span has matched */
if (lastIndex) {
// modified....
finalHtml += html.substring(lastIndex);
html=finalHtml;
finalHtml='';
lastIndex=0;
Expand Down
2 changes: 1 addition & 1 deletion src/factories.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ angular.module('textAngular.factories', [])
finalHtml += html.substring(lastIndex, match.index) + appleSpaceVal;
lastIndex = match.index + match[0].length;
}
finalHtml += html.substring(lastIndex);
/* istanbul ignore next: apple-contereted-space span has matched */
if (lastIndex) {
// modified....
finalHtml += html.substring(lastIndex);
html=finalHtml;
finalHtml='';
lastIndex=0;
Expand Down

0 comments on commit e086974

Please sign in to comment.