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.

33 lines (31 loc) 803 B
import phrasingContent from "./phrasing-content.js"; const footnote = { htmlDocLink: "", contentAllowed:{ ...phrasingContent }, attributesAllowed: { url(value) { this.href(value); return { href: value } }, href(value) { if(value[0]!=="#") { throw new TypeError(`Footnote href ${value} must start with a #`) } new URL(value,document?.baseURI); } }, transform(node) { node.classList.push("autohelm-footnote") return node; }, beforeMount(node) { node.tag = "span"; return node; } } delete footnote.contentAllowed.footnote; export {footnote,footnote as default}