import{j as e}from"./iframe-p4aYZyoq.js";import{g as l}from"./utils-pBtDpbI-.js";const a=({children:t,substring:s})=>{if(!t||!s)return e.jsx(e.Fragment,{children:t});const i=s.trim(),r=l(t,i);if(r<0)return e.jsx(e.Fragment,{children:t});const n=t.slice(0,r),g=t.slice(r,r+i.length),h=t.slice(r+i.length);return e.jsxs(e.Fragment,{children:[n,e.jsx("mark",{children:g}),h]})};try{substringhighlight.displayName="substringhighlight",substringhighlight.__docgenInfo={description:"",displayName:"substringhighlight",props:{substring:{defaultValue:null,description:"",name:"substring",required:!0,type:{name:"string"}}}}}catch{}export{a as S};
