mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix tslint error and add and block if tslint give error in the pipeline
This commit is contained in:
@@ -19,6 +19,7 @@ export interface HightlightTransformResult {
|
||||
text: string;
|
||||
changed: boolean;
|
||||
}
|
||||
|
||||
export class HighlightTransformService {
|
||||
|
||||
/**
|
||||
@@ -26,7 +27,7 @@ export class HighlightTransformService {
|
||||
* @param text Text to search within
|
||||
* @param search Text pattern to search for
|
||||
* @param wrapperClass CSS class used to provide highlighting style
|
||||
* @returns New text along with boolean value to indicate whether anything was highlighted
|
||||
* @returns New text along with boolean value to indicate whether anything was highlighted
|
||||
*/
|
||||
public highlight(text: string, search: string, wrapperClass: string = 'highlight'): HightlightTransformResult {
|
||||
let isMatching = false,
|
||||
@@ -43,9 +44,9 @@ export class HighlightTransformService {
|
||||
isMatching = true;
|
||||
return `<span class="${wrapperClass}">${match}</span>`;
|
||||
});
|
||||
return { text: result, changed: isMatching};
|
||||
return { text: result, changed: isMatching };
|
||||
} else {
|
||||
return { text: result, changed: isMatching};
|
||||
return { text: result, changed: isMatching };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user