(text: string, startIndex: number)
| 142 | * @returns index where the next invocation of `parseStyleNext` should resume. |
| 143 | */ |
| 144 | export function parseStyleNext(text: string, startIndex: number): number { |
| 145 | const end = parserState.textEnd; |
| 146 | let index = (parserState.key = consumeWhitespace(text, startIndex, end)); |
| 147 | if (end === index) { |
| 148 | // we reached an end so just quit |
| 149 | return -1; |
| 150 | } |
| 151 | index = parserState.keyEnd = consumeStyleKey(text, index, end); |
| 152 | index = consumeSeparator(text, index, end, CharCode.COLON); |
| 153 | index = parserState.value = consumeWhitespace(text, index, end); |
| 154 | index = parserState.valueEnd = consumeStyleValue(text, index, end); |
| 155 | return consumeSeparator(text, index, end, CharCode.SEMI_COLON); |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * Reset the global state of the styling parser. |
no test coverage detected
searching dependent graphs…