(question: string)
| 273 | * the model to point at this syntax when a card is missing. |
| 274 | */ |
| 275 | export function mentionsIn(question: string): string[] { |
| 276 | const found: string[] = []; |
| 277 | const pattern = /@([A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*)/g; |
| 278 | let match = pattern.exec(question); |
| 279 | while (match !== null) { |
| 280 | found.push(match[1]); |
| 281 | match = pattern.exec(question); |
| 282 | } |
| 283 | return found; |
| 284 | } |
| 285 | |
| 286 | /** Names written in backticks, single quotes or double quotes. */ |
| 287 | export function quotedNamesIn(question: string): string[] { |
no test coverage detected