prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
37 lines (36 loc) • 854 B
JavaScript
import { l as r } from "../prismCore-5c7f03d0.js";
var t = (e, a) => ({
pattern: RegExp(`<#${e}[\\s\\S]*?#>`),
alias: "block",
inside: {
delimiter: {
pattern: RegExp(`^<#${e}|#>$`),
alias: "important"
},
content: {
pattern: /[\s\S]+/,
alias: "language-" + a,
inside: a
}
}
}), s = (e) => ({
block: {
pattern: /<#[\s\S]+?#>/,
inside: {
directive: t("@", {
"attr-value": {
pattern: /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,
inside: {
punctuation: /^=|^["']|["']$/
}
},
keyword: /\b\w+(?=\s)/,
"attr-name": /\b\w+/
}),
expression: t("=", e),
"class-feature": t("\\+", e),
standard: t("", e)
}
}
});
r["t4-templating"] = Object.defineProperty({}, "createT4", { value: s });