UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

26 lines (24 loc) 868 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.details = details; exports.block = block; exports.section = section; const doc_general_1 = require("./doc-general"); const mermaid_1 = require("../../util/mermaid/mermaid"); function details(title, content, { color, open = false, hideIfEmpty = true, prefixInit = '' } = {}) { return hideIfEmpty && content.trim().length === 0 ? '' : ` ${prefixInit}<details${open ? ' open' : ''}><summary style="${color ? 'color:' + color : ''}">${title}</summary> ${content} </details> `; } function block({ type, content }) { return ` > [!${type}] ${(0, doc_general_1.prefixLines)(content, '> ')} `; } function section(title, depth = 2, anchor = (0, mermaid_1.escapeId)(title)) { return `<h${depth} id="${anchor}">${title}</h${depth}>`; } //# sourceMappingURL=doc-structure.js.map