UNPKG

prism-code-editor

Version:

Lightweight, extensible code editor component for the web using Prism

38 lines (37 loc) 1.09 kB
import { a as languages, c as tokenize } from "../../core-8vQkh0Rd.js"; import { t as embeddedIn } from "../../templating-BJI19oXa.js"; import "./markup.js"; //#region src/prism/languages/twig.js languages.twig = { "twig": { pattern: /\{(?:#[^]*?#|%[^]*?%|\{[^]*?\})\}/, alias: "language-twig", inside: { "comment": /^\{#[^]+/, "tag-name": { pattern: /(^\{%-?\s*)\w+/, lookbehind: true, alias: "keyword" }, "delimiter": { pattern: /^..-?|-?[%}]\}$/g, alias: "punctuation" }, "string": { pattern: /(["'])(?:\\.|(?!\1)[^\\\n])*\1/, inside: { "punctuation": /^.|["']$/g } }, "keyword": /\b(?:even|if|odd)\b/, "boolean": /\b(?:false|true|null)\b/, "number": /\b0x[a-fA-F\d]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/, "operator": [{ pattern: /(\s)(?:and|b-and|b-x?or|ends with|in|is|matches|not|or|same as|starts with)(?!\S)/, lookbehind: true }, /[=<>]=?|!=|\*\*?|\/\/?|\?:?|[~%|+-]/], "punctuation": /[()[\]{}.,:]/ } }, [tokenize]: embeddedIn("html") }; //#endregion //# sourceMappingURL=twig.js.map