UNPKG

prism-code-editor

Version:

Lightweight, extensible code editor component for the web using Prism

49 lines (48 loc) 1.36 kB
import { l as a } from "../prismCore-5c7f03d0.js"; var u = `(?:[a-zA-Z_\\x80-\\uFFFF][\\w\\x80-\\uFFFF]*|-?(?:\\.\\d+|\\d+(?:\\.\\d*)?)|"[^"\\\\]*(?:\\\\[\\s\\S][^"\\\\]*)*"|<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>)`, e = { markup: { pattern: /(^<)[\s\S]+(?=>$)/, lookbehind: !0, alias: ["language-markup", "language-html", "language-xml"], inside: "markup" } }, r = (t, n) => RegExp(t.replace(/<ID>/g, u), n); a.gv = a.dot = { comment: { pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m, greedy: !0 }, "graph-name": { pattern: r(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source, "i"), lookbehind: !0, greedy: !0, alias: "class-name", inside: e }, "attr-value": { pattern: r(/(=[ \t\r\n]*)<ID>/.source), lookbehind: !0, greedy: !0, inside: e }, "attr-name": { pattern: r(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source), lookbehind: !0, greedy: !0, inside: e }, keyword: /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i, "compass-point": { pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/, lookbehind: !0, alias: "builtin" }, node: { pattern: r(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source), lookbehind: !0, greedy: !0, inside: e }, operator: /[=:]|-[->]/, punctuation: /[\[\]{};,]/ };