remove unused class TextHighlighter

This commit is contained in:
Michael Telatynski 2020-09-01 15:37:07 +01:00
parent 656a815991
commit 6c39213116

View file

@ -339,32 +339,6 @@ class HtmlHighlighter extends BaseHighlighter<string> {
} }
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars
class TextHighlighter extends BaseHighlighter<React.ReactNode> {
private key = 0;
/* create a <span> node to hold the given content
*
* snippet: content of the span
* highlight: true to highlight as a search match
*
* returns a React node
*/
protected processSnippet(snippet: string, highlight: boolean): React.ReactNode {
const key = this.key++;
let node = <span key={key} className={highlight ? this.highlightClass : null}>
{ snippet }
</span>;
if (highlight && this.highlightLink) {
node = <a key={key} href={this.highlightLink}>{ node }</a>;
}
return node;
}
}
interface IContent { interface IContent {
format?: string; format?: string;
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase