Skip to content

Commit

Permalink
Use regex for replace
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Roes committed Oct 28, 2019
1 parent 29ffff2 commit 0f86a77
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ export function arrayContainsObjects(value: unknown[]): boolean {
* Removes markup added by kibana fields html formatter
*/
export function trimAngularSpan(text: string): string {
return text.replace('<span ng-non-bindable>', '').replace('</span>', '');
return text.replace(/^<span ng-non-bindable>/, '').replace(/<\/span>$/, '');
}

0 comments on commit 0f86a77

Please sign in to comment.