(text: string)
| 253 | }; |
| 254 | |
| 255 | const statusLinkWrapper = (text: string) => { |
| 256 | const matches = text.match( |
| 257 | /(?<!href=")https?:\/\/(?:www\.)?[-\w@:%.+~#=]{1,256}\.[a-zA-Z\d()]{1,6}\b([-\w()@:%+.~#?&/=]*)(?=\W|$)/g |
| 258 | ); |
| 259 | [...new Set(matches ?? [])]?.forEach(url => { |
| 260 | text = text.replace( |
| 261 | new RegExp(`${escapeRegex(url)}(?=\\W|$)`, 'g'), |
| 262 | `<a href="${url}">${url}</a>` |
| 263 | ); |
| 264 | }); |
| 265 | return text; |
| 266 | }; |
| 267 | |
| 268 | const formatStatus = (text: string, status: APIStatus) => { |
| 269 | const enableFacets = false; |
no test coverage detected