import{__assign as r}from"tslib";import{jsx as t,Fragment as e}from"react/jsx-runtime";import i from"../../styles/ScopeTree.module.css.js";var n=function(n){var s=n.text,c=n.highlight;if(!c||!c.trim())return t(e,{children:s});var o=new RegExp("(".concat(c,")"),"gi"),l=s.split(o);return t(e,{children:l.map(function(e,n){return o.test(e)?t("span",r({className:i.highlightText},{children:e}),n):t("span",{children:e},n)})})};export{n as HighlightedText};
//# sourceMappingURL=HighlightedText.js.map
