MCPcopy
hub / github.com/webpack/webpack / _consumeTheRemnantsOfABadUrl

Function _consumeTheRemnantsOfABadUrl

lib/css/syntax.js:545–555  ·  view source on GitHub ↗
(input, pos)

Source from the content-addressed store, hash-verified

543 * @returns {number} position past the recovery `)` or EOF
544 */
545const _consumeTheRemnantsOfABadUrl = (input, pos) => {
546 for (;;) {
547 if (pos === input.length) return pos;
548 const cc = input.charCodeAt(pos);
549 pos++;
550 if (cc === CC_RIGHT_PARENTHESIS) return pos;
551 if (_ifTwoCodePointsAreValidEscape(input, pos)) {
552 pos = _consumeAnEscapedCodePoint(input, pos);
553 }
554 }
555};
556
557/**
558 * A mutable lexer token. The `next` / `consume` hot path reuses a single

Callers 1

consumeAUrlTokenFunction · 0.85

Calls 2

Tested by

no test coverage detected