(text: string, start = 0)
| 147 | |
| 148 | const keywordRegEx = /\s*([a-z][\w\-]*)\s*/giy; |
| 149 | function parseKeyword(text: string, start = 0): Parsed<Keyword> { |
| 150 | keywordRegEx.lastIndex = start; |
| 151 | const result = keywordRegEx.exec(text); |
| 152 | if (!result) { |
| 153 | return null; |
| 154 | } |
| 155 | const end = keywordRegEx.lastIndex; |
| 156 | const value = result[1]; |
| 157 | |
| 158 | return { start, end, value }; |
| 159 | } |
| 160 | |
| 161 | const backgroundRepeatKeywords = new Set(['repeat', 'repeat-x', 'repeat-y', 'no-repeat']); |
| 162 | export function parseRepeat(value: string, start = 0, keyword = parseKeyword(value, start)): Parsed<BackgroundRepeat> { |
no outgoing calls
no test coverage detected