( pos: number, modifiers: string, isStart: boolean, )
| 310 | } |
| 311 | |
| 312 | function buildModifiersTooltip( |
| 313 | pos: number, |
| 314 | modifiers: string, |
| 315 | isStart: boolean, |
| 316 | ) { |
| 317 | const textContent: string[] = [] |
| 318 | if (modifiers.includes('##')) |
| 319 | textContent.push(`${isStart ? 'Starts' : 'Ends'} With`) |
| 320 | else if (modifiers.includes('#')) textContent.push('Word Boundary') |
| 321 | if (modifiers.includes('^')) textContent.push('Case Sensitive') |
| 322 | if (modifiers.includes('%')) textContent.push('Remove Combining Characters') |
| 323 | if (textContent.length === 0) return null |
| 324 | return buildTooltip(pos, textContent.join(', ')) |
| 325 | } |
| 326 | |
| 327 | function buildTooltip(pos: number, textContent: string) { |
| 328 | return { |
no test coverage detected