MCPcopy Create free account
hub / github.com/angular/dev-infra / addCodeBlock

Method addCodeBlock

github-actions/saucelabs/set-saucelabs-env.js:19676–19680  ·  view source on GitHub ↗

* Adds an HTML codeblock to the summary buffer * * @param {string} code content to render within fenced code block * @param {string} lang (optional) language to syntax highlight code * * @returns {Summary} summary instance

(code, lang)

Source from the content-addressed store, hash-verified

19674 * @returns {Summary} summary instance
19675 */
19676 addCodeBlock(code, lang) {
19677 const attrs = Object.assign({}, lang && { lang });
19678 const element = this.wrap("pre", this.wrap("code", code), attrs);
19679 return this.addRaw(element).addEOL();
19680 }
19681 /**
19682 * Adds an HTML list to the summary buffer
19683 *

Callers

nothing calls this directly

Calls 3

wrapMethod · 0.45
addEOLMethod · 0.45
addRawMethod · 0.45

Tested by

no test coverage detected