* 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)
| 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 | * |