* Adds an HTML section heading element * * @param {string} text heading text * @param {number | string} [level=1] (optional) the heading level, default: 1 * * @returns {Summary} summary instance
(text, level)
| 19751 | * Adds an HTML codeblock to the summary buffer |
| 19752 | * |
| 19753 | * @param {string} code content to render within fenced code block |
| 19754 | * @param {string} lang (optional) language to syntax highlight code |
| 19755 | * |
| 19756 | * @returns {Summary} summary instance |
| 19757 | */ |
| 19758 | addCodeBlock(code, lang) { |
| 19759 | const attrs = Object.assign({}, lang && { lang }); |
| 19760 | const element = this.wrap("pre", this.wrap("code", code), attrs); |
| 19761 | return this.addRaw(element).addEOL(); |