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

Method addCodeBlock

github-actions/browserstack/set-browserstack-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 if (!content) {
19675 return `<${tag}${htmlAttrs}>`;
19676 }
19677 return `<${tag}${htmlAttrs}>${content}</${tag}>`;
19678 }
19679 /**
19680 * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.
19681 *
19682 * @param {SummaryWriteOptions} [options] (optional) options for write operation
19683 *

Callers

nothing calls this directly

Calls 3

wrapMethod · 0.45
addEOLMethod · 0.45
addRawMethod · 0.45

Tested by

no test coverage detected