( cooked: string, raw: string, )
| 284 | * preceding placeholder, along with the static text that follows. |
| 285 | */ |
| 286 | export function parsePlaceholder( |
| 287 | cooked: string, |
| 288 | raw: string, |
| 289 | ): {messagePart: string; placeholderName?: string; associatedMessageId?: string} { |
| 290 | const {text: messagePart, block} = splitBlock(cooked, raw); |
| 291 | if (block === undefined) { |
| 292 | return {messagePart}; |
| 293 | } else { |
| 294 | const [placeholderName, associatedMessageId] = block.split(ID_SEPARATOR); |
| 295 | return {messagePart, placeholderName, associatedMessageId}; |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | /** |
| 300 | * Split a message part (`cooked` + `raw`) into an optional delimited "block" off the front and the |
no test coverage detected
searching dependent graphs…