lib/rules/html-indent.js
function findPairClosePunctuator(openToken) {
                const openPunctuatorText = openToken.value

                const isPairClosePunctuator =
                    openPunctuatorText === "("
                        ? isRightParen
                        : openPunctuatorText === "{"
                        ? isRightBrace
                        : isRightBracket
                let token = sourceCode.getTokenAfter(openToken)
                while (token) {
                    if (isPairClosePunctuator(token)) {
                        return token
                    }
                    if (isIndentationStartPunctuator(token)) {
                        // skip
                        const next = findPairClosePunctuator(token)
                        token = sourceCode.getTokenAfter(next)
                        continue
                    }

                    token = sourceCode.getTokenAfter(token)
                }
                return null
            }
function findPairClosePunctuator(openToken) {
                const openPunctuatorText = openToken.value

                const isPairClosePunctuator =
                    openPunctuatorText === "("
                        ? isRightParen
                        : openPunctuatorText === "{"
                        ? isRightBrace
                        : isRightBracket
                let token = sourceCode.getTokenAfter(openToken)
                while (token) {
                    if (isPairClosePunctuator(token)) {
                        return token
                    }
                    if (isIndentationStartPunctuator(token)) {
                        // skip
                        const next = findPairClosePunctuator(token)
                        token = sourceCode.getTokenAfter(next)
                        continue
                    }

                    token = sourceCode.getTokenAfter(token)
                }
                return null
            }
function findPairClosePunctuator ( openToken ) { const openPunctuatorText = openToken . value const isPairClosePunctuator = openPunctuatorText === "(" ? isRightParen : openPunctuatorText === "{" ? isRightBrace : isRightBracket let token = sourceCode . getTokenAfter ( openToken ) while ( token ) { if ( isPairClosePunctuator ( token ) ) { return token } if ( isIndentationStartPunctuator ( token ) ) { // skip const next = findPairClosePunctuator ( token ) token = sourceCode . getTokenAfter ( next ) continue } token = sourceCode . getTokenAfter ( token ) } return null }
Find pair close punctuator token.
@param {Node} openToken The open punctuator token
@returns {Token} The indentation-end punctuator token.
Find pair close punctuator token .