(
buffer: string,
colonIdx: number = buffer.indexOf(':'),
)
| 627 | } |
| 628 | |
| 629 | function parseDeclaration( |
| 630 | buffer: string, |
| 631 | colonIdx: number = buffer.indexOf(':'), |
| 632 | ): Declaration | null { |
| 633 | if (colonIdx === -1) return null |
| 634 | let importantIdx = buffer.indexOf('!important', colonIdx + 1) |
| 635 | return decl( |
| 636 | buffer.slice(0, colonIdx).trim(), |
| 637 | buffer.slice(colonIdx + 1, importantIdx === -1 ? buffer.length : importantIdx).trim(), |
| 638 | importantIdx !== -1, |
| 639 | ) |
| 640 | } |
| 641 | |
| 642 | function parseString( |
| 643 | input: string, |