()
| 16 | const initialContent = data.content; |
| 17 | |
| 18 | const applyRegex = () => { |
| 19 | const { regex } = checkRegex(data, { regex: data.regex, flags: 'gmi' }); |
| 20 | |
| 21 | if (regex) { |
| 22 | setContent( |
| 23 | tagWrapper({ |
| 24 | regex, |
| 25 | value: initialContent, |
| 26 | attributes: { |
| 27 | class: |
| 28 | 'shadow-sm mx-1 my-[2px] px-1 py-[2px] rounded-md text-white bg-green-500 text-black inline-block', |
| 29 | }, |
| 30 | }), |
| 31 | ); |
| 32 | } else { |
| 33 | setContent(initialContent); |
| 34 | } |
| 35 | }; |
| 36 | |
| 37 | // eslint-disable-next-line react-hooks/exhaustive-deps |
| 38 | useEffect(applyRegex, []); |
nothing calls this directly
no test coverage detected