|
1 | 1 | /* PrismJS 1.30.0 |
2 | | -https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+cpp+cmake+coffeescript+crystal+d+dart+diff+django+elixir+erlang+go+groovy+java+json+julia+kotlin+latex+lua+markdown+markup-templating+matlab+nginx+nim+nix+ocaml+perl+php+python+qml+r+jsx+ruby+rust+scss+scala+shell-session+sql+tcl+typescript+yaml+zig */ |
| 2 | +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+cpp+cmake+coffeescript+crystal+d+dart+diff+django+dot+elixir+erlang+go+groovy+java+json+julia+kotlin+latex+lua+markdown+markup-templating+matlab+nginx+nim+nix+ocaml+perl+php+python+qml+r+jsx+ruby+rust+scss+scala+shell-session+sql+tcl+typescript+yaml+zig */ |
3 | 3 | /// <reference lib="WebWorker"/> |
4 | 4 |
|
5 | 5 | var _self = (typeof window !== 'undefined') |
@@ -2929,6 +2929,83 @@ Prism.languages.insertBefore('d', 'function', { |
2929 | 2929 |
|
2930 | 2930 | }(Prism)); |
2931 | 2931 |
|
| 2932 | +// https://www.graphviz.org/doc/info/lang.html |
| 2933 | + |
| 2934 | +(function (Prism) { |
| 2935 | + |
| 2936 | + var ID = '(?:' + [ |
| 2937 | + // an identifier |
| 2938 | + /[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source, |
| 2939 | + // a number |
| 2940 | + /-?(?:\.\d+|\d+(?:\.\d*)?)/.source, |
| 2941 | + // a double-quoted string |
| 2942 | + /"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source, |
| 2943 | + // HTML-like string |
| 2944 | + /<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/.source |
| 2945 | + ].join('|') + ')'; |
| 2946 | + |
| 2947 | + var IDInside = { |
| 2948 | + 'markup': { |
| 2949 | + pattern: /(^<)[\s\S]+(?=>$)/, |
| 2950 | + lookbehind: true, |
| 2951 | + alias: ['language-markup', 'language-html', 'language-xml'], |
| 2952 | + inside: Prism.languages.markup |
| 2953 | + } |
| 2954 | + }; |
| 2955 | + |
| 2956 | + /** |
| 2957 | + * @param {string} source |
| 2958 | + * @param {string} flags |
| 2959 | + * @returns {RegExp} |
| 2960 | + */ |
| 2961 | + function withID(source, flags) { |
| 2962 | + return RegExp(source.replace(/<ID>/g, function () { return ID; }), flags); |
| 2963 | + } |
| 2964 | + |
| 2965 | + Prism.languages.dot = { |
| 2966 | + 'comment': { |
| 2967 | + pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m, |
| 2968 | + greedy: true |
| 2969 | + }, |
| 2970 | + 'graph-name': { |
| 2971 | + pattern: withID(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source, 'i'), |
| 2972 | + lookbehind: true, |
| 2973 | + greedy: true, |
| 2974 | + alias: 'class-name', |
| 2975 | + inside: IDInside |
| 2976 | + }, |
| 2977 | + 'attr-value': { |
| 2978 | + pattern: withID(/(=[ \t\r\n]*)<ID>/.source), |
| 2979 | + lookbehind: true, |
| 2980 | + greedy: true, |
| 2981 | + inside: IDInside |
| 2982 | + }, |
| 2983 | + 'attr-name': { |
| 2984 | + pattern: withID(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source), |
| 2985 | + lookbehind: true, |
| 2986 | + greedy: true, |
| 2987 | + inside: IDInside |
| 2988 | + }, |
| 2989 | + 'keyword': /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i, |
| 2990 | + 'compass-point': { |
| 2991 | + pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/, |
| 2992 | + lookbehind: true, |
| 2993 | + alias: 'builtin' |
| 2994 | + }, |
| 2995 | + 'node': { |
| 2996 | + pattern: withID(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source), |
| 2997 | + lookbehind: true, |
| 2998 | + greedy: true, |
| 2999 | + inside: IDInside |
| 3000 | + }, |
| 3001 | + 'operator': /[=:]|-[->]/, |
| 3002 | + 'punctuation': /[\[\]{};,]/ |
| 3003 | + }; |
| 3004 | + |
| 3005 | + Prism.languages.gv = Prism.languages.dot; |
| 3006 | + |
| 3007 | +}(Prism)); |
| 3008 | + |
2932 | 3009 | Prism.languages.elixir = { |
2933 | 3010 | 'doc': { |
2934 | 3011 | pattern: /@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/, |
|
0 commit comments