test/html-formatter.js
/**
     * Inserted on one indented line if shorter than the character limit.
     * Otherwise, insert paragraphs (delimited by empty new lines) which wrap at the character limit.
     */
Inserted on one indented line if shorter than the character limit.
Otherwise, insert paragraphs (delimited by empty new lines) which wrap at the character limit.
Inserted on one indented line if shorter than the character limit . Otherwise insert paragraphs ( delimited by empty new lines ) which wrap at the character limit .
insertCommentTag(commentTag, html, indentLevel) {
        const comment = commentTag.trim().slice(4, -3);
        const oneLineCommentTag = `<!-- ${HtmlFormatter.normalizeWhitespace(comment)} -->`;
        if (this.shorterThanCharacterLimit(oneLineCommentTag, indentLevel)) {
            return this.insertIndentedLine(oneLineCommentTag, html, indentLevel);
        }
        const htmlWithCommentOpening = this.insertIndentedLine("<!--", html, indentLevel);
        const htmlWithComment = this.insertTextNode(comment, htmlWithCommentOpening, indentLevel + 2);
        return this.insertIndentedLine("-->", htmlWithComment, indentLevel);
    }
insertCommentTag ( commentTag , html , indentLevel ) { const comment = commentTag . trim ( ) . slice ( 4 , - 3 ) ; const oneLineCommentTag = ` ${ HtmlFormatter . normalizeWhitespace ( comment ) } ` ; if ( this . shorterThanCharacterLimit ( oneLineCommentTag , indentLevel ) ) { return this . insertIndentedLine ( oneLineCommentTag , html , indentLevel ) ; } const htmlWithCommentOpening = this . insertIndentedLine ( "<!--" , html , indentLevel ) ; const htmlWithComment = this . insertTextNode ( comment , htmlWithCommentOpening , indentLevel + 2 ) ; return this . insertIndentedLine ( "-->" , htmlWithComment , indentLevel ) ; }
Inserted on one indented line if shorter than the character limit.
Inserted on one indented line if shorter than the character limit .