import{jsx as r,Fragment as t}from"react/jsx-runtime";import{memo as i}from"react";import e from"./HighlightsText.scss.js";var n=i((function(i){var n=i.text,c=i.highlight;if(null==c||!c.trim())return r(t,{children:n});var a=new RegExp("(".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),")"),"gi"),h=n.split(a);return r(t,{children:h.map((function(t,i){return i%2==1?r("span",{className:e.highlightText,children:t},i):t}))})}));export{n as HighlightText};
//# sourceMappingURL=HighlightText.js.map
