UNPKG

secst

Version:

SECST is a semantic, extensible, computational, styleable tagged markup language. You can use it to joyfully create compelling, interactive documents backed by HTML.

26 lines (24 loc) 592 B
import textContent from "./text-content.js"; const toc = { htmlDocLink: "", contentAllowed: true, attributesAllowed: { "data-toggle": true, toggle() { return { "data-toggle": "" } } }, transform(node) { node.tag = "h1"; if (!node.classList.includes("toc")) { node.classList.push("toc"); } if (node.content.length === 0) { node.content = ["Table of Contents"] } return node; } } export {toc,toc as default}