Rev 637 | Rev 759 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 637 | Rev 679 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. |
2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. |
3 | * Licensed under the LGPL or a commercial license. |
3 | * Licensed under the LGPL or a commercial license. |
4 | * For LGPL see License.txt in the project root for license information. |
4 | * For LGPL see License.txt in the project root for license information. |
5 | * For commercial licenses see https://www.tiny.cloud/ |
5 | * For commercial licenses see https://www.tiny.cloud/ |
6 | * |
6 | * |
7 | * Version: 5.9.2 (2021-09-08) |
7 | * Version: 5.10.2 (2021-11-17) |
8 | */ |
8 | */ |
9 | (function () { |
9 | (function () { |
10 | 'use strict'; |
10 | 'use strict'; |
11 | 11 | ||
12 | var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager'); |
12 | var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager'); |
Line 139... | Line 139... | ||
139 | 139 | ||
140 | var exports$1 = {}, module = { exports: exports$1 }, global = {}; |
140 | var exports$1 = {}, module = { exports: exports$1 }, global = {}; |
141 | (function (define, exports, module, require) { |
141 | (function (define, exports, module, require) { |
142 | var oldprism = window.Prism; |
142 | var oldprism = window.Prism; |
143 | window.Prism = { manual: true }; |
143 | window.Prism = { manual: true }; |
144 | (function (f) { |
144 | (function (global, factory) { |
145 | if (typeof exports === 'object' && typeof module !== 'undefined') { |
145 | typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EphoxContactWrapper = factory()); |
146 | module.exports = f(); |
- | |
147 | } else if (typeof define === 'function' && define.amd) { |
- | |
148 | define([], f); |
- | |
149 | } else { |
- | |
150 | var g; |
- | |
151 | if (typeof window !== 'undefined') { |
- | |
152 | g = window; |
- | |
153 | } else if (typeof global !== 'undefined') { |
- | |
154 | g = global; |
- | |
155 | } else if (typeof self !== 'undefined') { |
- | |
156 | g = self; |
- | |
157 | } else { |
- | |
158 | g = this; |
- | |
159 | } |
- | |
160 | g.EphoxContactWrapper = f(); |
- | |
161 | } |
- | |
162 | }(function () { |
146 | }(this, function () { |
163 | return function () { |
- | |
164 | function r(e, n, t) { |
- | |
165 | function o(i, f) { |
- | |
166 | if (!n[i]) { |
- | |
167 | if (!e[i]) { |
- | |
168 | var c = 'function' == typeof require && require; |
- | |
169 | if (!f && c) |
- | |
170 | return c(i, !0); |
- | |
171 | if (u) |
- | |
172 | return u(i, !0); |
- | |
173 | var a = new Error('Cannot find module \'' + i + '\''); |
- | |
174 | throw a.code = 'MODULE_NOT_FOUND', a; |
- | |
175 | } |
- | |
176 | var p = n[i] = { exports: {} }; |
- | |
177 | e[i][0].call(p.exports, function (r) { |
- | |
178 | var n = e[i][1][r]; |
- | |
179 | return o(n || r); |
- | |
180 | }, p, p.exports, r, e, n, t); |
- | |
181 | } |
- | |
182 | return n[i].exports; |
- | |
183 | } |
- | |
184 | for (var u = 'function' == typeof require && require, i = 0; i < t.length; i++) |
- | |
185 | o(t[i]); |
- | |
186 | return o; |
- | |
187 | } |
- | |
188 | return r; |
- | |
189 | }()({ |
- | |
190 | 1: [ |
- | |
191 | function (require, module, exports) { |
- | |
192 | Prism.languages.c = Prism.languages.extend('clike', { |
- | |
193 | 'comment': { |
- | |
194 | pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, |
- | |
195 | greedy: true |
- | |
196 | }, |
- | |
197 | 'class-name': { |
- | |
198 | pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, |
- | |
199 | lookbehind: true |
- | |
200 | }, |
- | |
201 | 'keyword': /\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, |
147 | var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; |
202 | 'function': /\b[a-z_]\w*(?=\s*\()/i, |
- | |
203 | 'number': /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, |
- | |
204 | 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ |
- | |
205 | }); |
- | |
206 | Prism.languages.insertBefore('c', 'string', { |
- | |
207 | 'macro': { |
- | |
208 | pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, |
- | |
209 | lookbehind: true, |
- | |
210 | greedy: true, |
- | |
211 | alias: 'property', |
- | |
212 | inside: { |
- | |
213 | 'string': [ |
- | |
214 | { |
- | |
215 | pattern: /^(#\s*include\s*)<[^>]+>/, |
- | |
216 | lookbehind: true |
- | |
217 | }, |
- | |
218 | Prism.languages.c['string'] |
- | |
219 | ], |
- | |
220 | 'comment': Prism.languages.c['comment'], |
- | |
221 | 'macro-name': [ |
- | |
222 | { |
- | |
223 | pattern: /(^#\s*define\s+)\w+\b(?!\()/i, |
- | |
224 | lookbehind: true |
- | |
225 | }, |
- | |
226 | { |
- | |
227 | pattern: /(^#\s*define\s+)\w+\b(?=\()/i, |
- | |
228 | lookbehind: true, |
- | |
229 | alias: 'function' |
- | |
230 | } |
- | |
231 | ], |
- | |
232 | 'directive': { |
- | |
233 | pattern: /^(#\s*)[a-z]+/, |
- | |
234 | lookbehind: true, |
- | |
235 | alias: 'keyword' |
- | |
236 | }, |
- | |
237 | 'directive-hash': /^#/, |
- | |
238 | 'punctuation': /##|\\(?=[\r\n])/, |
- | |
239 | 'expression': { |
- | |
240 | pattern: /\S[\s\S]*/, |
- | |
241 | inside: Prism.languages.c |
- | |
242 | } |
- | |
243 | } |
- | |
244 | }, |
- | |
245 | 'constant': /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/ |
- | |
246 | }); |
- | |
247 | delete Prism.languages.c['boolean']; |
- | |
248 | }, |
- | |
249 | {} |
- | |
250 | ], |
- | |
251 | 2: [ |
- | |
252 | function (require, module, exports) { |
- | |
253 | Prism.languages.clike = { |
148 | var prismCore = { exports: {} }; |
254 | 'comment': [ |
- | |
255 | { |
- | |
256 | pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, |
- | |
257 | lookbehind: true, |
- | |
258 | greedy: true |
- | |
259 | }, |
- | |
260 | { |
- | |
261 | pattern: /(^|[^\\:])\/\/.*/, |
- | |
262 | lookbehind: true, |
- | |
263 | greedy: true |
- | |
264 | } |
- | |
265 | ], |
- | |
266 | 'string': { |
- | |
267 | pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, |
- | |
268 | greedy: true |
- | |
269 | }, |
- | |
270 | 'class-name': { |
- | |
271 | pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i, |
- | |
272 | lookbehind: true, |
- | |
273 | inside: { 'punctuation': /[.\\]/ } |
- | |
274 | }, |
- | |
275 | 'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, |
- | |
276 | 'boolean': /\b(?:true|false)\b/, |
- | |
277 | 'function': /\b\w+(?=\()/, |
- | |
278 | 'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, |
- | |
279 | 'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, |
- | |
280 | 'punctuation': /[{}[\];(),.:]/ |
- | |
281 | }; |
- | |
282 | }, |
- | |
283 | {} |
- | |
284 | ], |
- | |
285 | 3: [ |
- | |
286 | function (require, module, exports) { |
- | |
287 | (function (global) { |
149 | (function (module) { |
288 | (function () { |
- | |
289 | var _self = typeof window !== 'undefined' ? window : typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope ? self : {}; |
150 | var _self = typeof window !== 'undefined' ? window : typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope ? self : {}; |
290 | var Prism = function (_self) { |
151 | var Prism = function (_self) { |
291 | var lang = /\blang(?:uage)?-([\w-]+)\b/i; |
152 | var lang = /\blang(?:uage)?-([\w-]+)\b/i; |
292 | var uniqueId = 0; |
153 | var uniqueId = 0; |
293 | var plainTextGrammar = {}; |
154 | var plainTextGrammar = {}; |
Line 366... | Line 227... | ||
366 | return document.currentScript; |
227 | return document.currentScript; |
367 | } |
228 | } |
368 | try { |
229 | try { |
369 | throw new Error(); |
230 | throw new Error(); |
370 | } catch (err) { |
231 | } catch (err) { |
371 | var src = (/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(err.stack) || [])[1]; |
232 | var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1]; |
372 | if (src) { |
233 | if (src) { |
373 | var scripts = document.getElementsByTagName('script'); |
234 | var scripts = document.getElementsByTagName('script'); |
374 | for (var i in scripts) { |
235 | for (var i in scripts) { |
375 | if (scripts[i].src == src) { |
236 | if (scripts[i].src == src) { |
376 | return scripts[i]; |
237 | return scripts[i]; |
Line 805... | Line 666... | ||
805 | } |
666 | } |
806 | } |
667 | } |
807 | } |
668 | } |
808 | return _; |
669 | return _; |
809 | }(_self); |
670 | }(_self); |
810 | if (typeof module !== 'undefined' && module.exports) { |
671 | if (module.exports) { |
811 | module.exports = Prism; |
672 | module.exports = Prism; |
812 | } |
673 | } |
813 | if (typeof global !== 'undefined') { |
674 | if (typeof commonjsGlobal !== 'undefined') { |
814 | global.Prism = Prism; |
675 | commonjsGlobal.Prism = Prism; |
815 | } |
676 | } |
816 | }.call(this)); |
677 | }(prismCore)); |
- | 678 | Prism.languages.clike = { |
|
- | 679 | 'comment': [ |
|
- | 680 | { |
|
817 | }.call(this, typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {})); |
681 | pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, |
- | 682 | lookbehind: true, |
|
- | 683 | greedy: true |
|
818 | }, |
684 | }, |
819 | {} |
685 | { |
- | 686 | pattern: /(^|[^\\:])\/\/.*/, |
|
- | 687 | lookbehind: true, |
|
- | 688 | greedy: true |
|
- | 689 | } |
|
820 | ], |
690 | ], |
- | 691 | 'string': { |
|
- | 692 | pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, |
|
- | 693 | greedy: true |
|
- | 694 | }, |
|
- | 695 | 'class-name': { |
|
- | 696 | pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i, |
|
- | 697 | lookbehind: true, |
|
- | 698 | inside: { 'punctuation': /[.\\]/ } |
|
- | 699 | }, |
|
- | 700 | 'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, |
|
- | 701 | 'boolean': /\b(?:true|false)\b/, |
|
- | 702 | 'function': /\b\w+(?=\()/, |
|
- | 703 | 'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, |
|
- | 704 | 'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, |
|
- | 705 | 'punctuation': /[{}[\];(),.:]/ |
|
- | 706 | }; |
|
- | 707 | (function (Prism) { |
|
- | 708 | function getPlaceholder(language, index) { |
|
- | 709 | return '___' + language.toUpperCase() + index + '___'; |
|
- | 710 | } |
|
- | 711 | Object.defineProperties(Prism.languages['markup-templating'] = {}, { |
|
- | 712 | buildPlaceholders: { |
|
- | 713 | value: function (env, language, placeholderPattern, replaceFilter) { |
|
- | 714 | if (env.language !== language) { |
|
- | 715 | return; |
|
- | 716 | } |
|
- | 717 | var tokenStack = env.tokenStack = []; |
|
- | 718 | env.code = env.code.replace(placeholderPattern, function (match) { |
|
- | 719 | if (typeof replaceFilter === 'function' && !replaceFilter(match)) { |
|
- | 720 | return match; |
|
- | 721 | } |
|
- | 722 | var i = tokenStack.length; |
|
- | 723 | var placeholder; |
|
- | 724 | while (env.code.indexOf(placeholder = getPlaceholder(language, i)) !== -1) { |
|
- | 725 | ++i; |
|
- | 726 | } |
|
- | 727 | tokenStack[i] = match; |
|
- | 728 | return placeholder; |
|
- | 729 | }); |
|
- | 730 | env.grammar = Prism.languages.markup; |
|
- | 731 | } |
|
- | 732 | }, |
|
- | 733 | tokenizePlaceholders: { |
|
- | 734 | value: function (env, language) { |
|
- | 735 | if (env.language !== language || !env.tokenStack) { |
|
- | 736 | return; |
|
- | 737 | } |
|
- | 738 | env.grammar = Prism.languages[language]; |
|
- | 739 | var j = 0; |
|
- | 740 | var keys = Object.keys(env.tokenStack); |
|
- | 741 | function walkTokens(tokens) { |
|
- | 742 | for (var i = 0; i < tokens.length; i++) { |
|
- | 743 | if (j >= keys.length) { |
|
- | 744 | break; |
|
- | 745 | } |
|
- | 746 | var token = tokens[i]; |
|
- | 747 | if (typeof token === 'string' || token.content && typeof token.content === 'string') { |
|
- | 748 | var k = keys[j]; |
|
- | 749 | var t = env.tokenStack[k]; |
|
- | 750 | var s = typeof token === 'string' ? token : token.content; |
|
- | 751 | var placeholder = getPlaceholder(language, k); |
|
- | 752 | var index = s.indexOf(placeholder); |
|
- | 753 | if (index > -1) { |
|
- | 754 | ++j; |
|
- | 755 | var before = s.substring(0, index); |
|
- | 756 | var middle = new Prism.Token(language, Prism.tokenize(t, env.grammar), 'language-' + language, t); |
|
- | 757 | var after = s.substring(index + placeholder.length); |
|
- | 758 | var replacement = []; |
|
- | 759 | if (before) { |
|
- | 760 | replacement.push.apply(replacement, walkTokens([before])); |
|
- | 761 | } |
|
- | 762 | replacement.push(middle); |
|
- | 763 | if (after) { |
|
- | 764 | replacement.push.apply(replacement, walkTokens([after])); |
|
- | 765 | } |
|
- | 766 | if (typeof token === 'string') { |
|
- | 767 | tokens.splice.apply(tokens, [ |
|
- | 768 | i, |
|
- | 769 | 1 |
|
- | 770 | ].concat(replacement)); |
|
- | 771 | } else { |
|
- | 772 | token.content = replacement; |
|
- | 773 | } |
|
- | 774 | } |
|
- | 775 | } else if (token.content) { |
|
- | 776 | walkTokens(token.content); |
|
- | 777 | } |
|
- | 778 | } |
|
- | 779 | return tokens; |
|
- | 780 | } |
|
- | 781 | walkTokens(env.tokens); |
|
- | 782 | } |
|
821 | 4: [ |
783 | } |
- | 784 | }); |
|
- | 785 | }(Prism)); |
|
- | 786 | Prism.languages.c = Prism.languages.extend('clike', { |
|
- | 787 | 'comment': { |
|
- | 788 | pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, |
|
- | 789 | greedy: true |
|
- | 790 | }, |
|
- | 791 | 'class-name': { |
|
- | 792 | pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, |
|
- | 793 | lookbehind: true |
|
- | 794 | }, |
|
822 | function (require, module, exports) { |
795 | 'keyword': /\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, |
- | 796 | 'function': /\b[a-z_]\w*(?=\s*\()/i, |
|
- | 797 | 'number': /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, |
|
- | 798 | 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ |
|
- | 799 | }); |
|
- | 800 | Prism.languages.insertBefore('c', 'string', { |
|
- | 801 | 'macro': { |
|
- | 802 | pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, |
|
- | 803 | lookbehind: true, |
|
- | 804 | greedy: true, |
|
- | 805 | alias: 'property', |
|
- | 806 | inside: { |
|
- | 807 | 'string': [ |
|
- | 808 | { |
|
- | 809 | pattern: /^(#\s*include\s*)<[^>]+>/, |
|
- | 810 | lookbehind: true |
|
- | 811 | }, |
|
- | 812 | Prism.languages.c['string'] |
|
- | 813 | ], |
|
- | 814 | 'comment': Prism.languages.c['comment'], |
|
- | 815 | 'macro-name': [ |
|
- | 816 | { |
|
- | 817 | pattern: /(^#\s*define\s+)\w+\b(?!\()/i, |
|
- | 818 | lookbehind: true |
|
- | 819 | }, |
|
- | 820 | { |
|
- | 821 | pattern: /(^#\s*define\s+)\w+\b(?=\()/i, |
|
- | 822 | lookbehind: true, |
|
- | 823 | alias: 'function' |
|
- | 824 | } |
|
- | 825 | ], |
|
- | 826 | 'directive': { |
|
- | 827 | pattern: /^(#\s*)[a-z]+/, |
|
- | 828 | lookbehind: true, |
|
- | 829 | alias: 'keyword' |
|
- | 830 | }, |
|
- | 831 | 'directive-hash': /^#/, |
|
- | 832 | 'punctuation': /##|\\(?=[\r\n])/, |
|
- | 833 | 'expression': { |
|
- | 834 | pattern: /\S[\s\S]*/, |
|
- | 835 | inside: Prism.languages.c |
|
- | 836 | } |
|
- | 837 | } |
|
- | 838 | }, |
|
- | 839 | 'constant': /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/ |
|
- | 840 | }); |
|
- | 841 | delete Prism.languages.c['boolean']; |
|
823 | (function (Prism) { |
842 | (function (Prism) { |
824 | var keyword = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/; |
843 | var keyword = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/; |
825 | var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function () { |
844 | var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function () { |
826 | return keyword.source; |
845 | return keyword.source; |
827 | }); |
846 | }); |
Line 864... | Line 883... | ||
864 | greedy: true |
883 | greedy: true |
865 | } |
884 | } |
866 | }); |
885 | }); |
867 | Prism.languages.insertBefore('cpp', 'keyword', { |
886 | Prism.languages.insertBefore('cpp', 'keyword', { |
868 | 'generic-function': { |
887 | 'generic-function': { |
869 | pattern: /\b[a-z_]\w*\s*<(?:[^<>]|<(?:[^<>])*>)*>(?=\s*\()/i, |
888 | pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, |
870 | inside: { |
889 | inside: { |
871 | 'function': /^\w+/, |
890 | 'function': /^\w+/, |
872 | 'generic': { |
891 | 'generic': { |
873 | pattern: /<[\s\S]+/, |
892 | pattern: /<[\s\S]+/, |
874 | alias: 'class-name', |
893 | alias: 'class-name', |
Line 891... | Line 910... | ||
891 | inside: Prism.languages.extend('cpp', {}) |
910 | inside: Prism.languages.extend('cpp', {}) |
892 | } |
911 | } |
893 | }); |
912 | }); |
894 | Prism.languages.insertBefore('inside', 'double-colon', { 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i }, Prism.languages.cpp['base-clause']); |
913 | Prism.languages.insertBefore('inside', 'double-colon', { 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i }, Prism.languages.cpp['base-clause']); |
895 | }(Prism)); |
914 | }(Prism)); |
896 | }, |
- | |
897 | {} |
- | |
898 | ], |
- | |
899 | 5: [ |
- | |
900 | function (require, module, exports) { |
- | |
901 | (function (Prism) { |
915 | (function (Prism) { |
902 | function replace(pattern, replacements) { |
916 | function replace(pattern, replacements) { |
903 | return pattern.replace(/<<(\d+)>>/g, function (m, index) { |
917 | return pattern.replace(/<<(\d+)>>/g, function (m, index) { |
904 | return '(?:' + replacements[+index] + ')'; |
918 | return '(?:' + replacements[+index] + ')'; |
905 | }); |
919 | }); |
Line 915... | Line 929... | ||
915 | } |
929 | } |
916 | return pattern.replace(/<<self>>/g, '[^\\s\\S]'); |
930 | return pattern.replace(/<<self>>/g, '[^\\s\\S]'); |
917 | } |
931 | } |
918 | var keywordKinds = { |
932 | var keywordKinds = { |
919 | type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void', |
933 | type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void', |
920 | typeDeclaration: 'class enum interface struct', |
934 | typeDeclaration: 'class enum interface record struct', |
921 | contextual: 'add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where', |
935 | contextual: 'add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)', |
922 | other: 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield' |
936 | other: 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield' |
923 | }; |
937 | }; |
924 | function keywordsToPattern(words) { |
938 | function keywordsToPattern(words) { |
925 | return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'; |
939 | return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'; |
926 | } |
940 | } |
Line 1019... | Line 1033... | ||
1019 | pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [typeExpressionWithoutTuple]), |
1033 | pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [typeExpressionWithoutTuple]), |
1020 | lookbehind: true, |
1034 | lookbehind: true, |
1021 | inside: typeInside |
1035 | inside: typeInside |
1022 | }, |
1036 | }, |
1023 | { |
1037 | { |
1024 | pattern: re(/\b<<0>>(?=\s+(?!<<1>>)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source, [ |
1038 | pattern: re(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source, [ |
1025 | typeExpression, |
1039 | typeExpression, |
1026 | nonContextualKeywords, |
1040 | nonContextualKeywords, |
1027 | name |
1041 | name |
1028 | ]), |
1042 | ]), |
1029 | inside: typeInside |
1043 | inside: typeInside |
Line 1086... | Line 1100... | ||
1086 | inside: typeInside |
1100 | inside: typeInside |
1087 | } |
1101 | } |
1088 | } |
1102 | } |
1089 | }, |
1103 | }, |
1090 | 'type-list': { |
1104 | 'type-list': { |
1091 | pattern: re(/\b((?:<<0>>\s+<<1>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>)(?:\s*,\s*(?:<<3>>|<<4>>))*(?=\s*(?:where|[{;]|=>|$))/.source, [ |
1105 | pattern: re(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source, [ |
1092 | typeDeclarationKeywords, |
1106 | typeDeclarationKeywords, |
1093 | genericName, |
1107 | genericName, |
1094 | name, |
1108 | name, |
1095 | typeExpression, |
1109 | typeExpression, |
1096 | keywords.source |
1110 | keywords.source, |
- | 1111 | nestedRound, |
|
- | 1112 | /\bnew\s*\(\s*\)/.source |
|
1097 | ]), |
1113 | ]), |
1098 | lookbehind: true, |
1114 | lookbehind: true, |
1099 | inside: { |
1115 | inside: { |
- | 1116 | 'record-arguments': { |
|
- | 1117 | pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [ |
|
- | 1118 | genericName, |
|
- | 1119 | nestedRound |
|
- | 1120 | ]), |
|
- | 1121 | lookbehind: true, |
|
- | 1122 | greedy: true, |
|
- | 1123 | inside: Prism.languages.csharp |
|
- | 1124 | }, |
|
1100 | 'keyword': keywords, |
1125 | 'keyword': keywords, |
1101 | 'class-name': { |
1126 | 'class-name': { |
1102 | pattern: RegExp(typeExpression), |
1127 | pattern: RegExp(typeExpression), |
1103 | greedy: true, |
1128 | greedy: true, |
1104 | inside: typeInside |
1129 | inside: typeInside |
1105 | }, |
1130 | }, |
1106 | 'punctuation': /,/ |
1131 | 'punctuation': /[,()]/ |
1107 | } |
1132 | } |
1108 | }, |
1133 | }, |
1109 | 'preprocessor': { |
1134 | 'preprocessor': { |
1110 | pattern: /(^[\t ]*)#.*/m, |
1135 | pattern: /(^[\t ]*)#.*/m, |
1111 | lookbehind: true, |
1136 | lookbehind: true, |
1112 | alias: 'property', |
1137 | alias: 'property', |
1113 | inside: { |
1138 | inside: { |
1114 | 'directive': { |
1139 | 'directive': { |
1115 | pattern: /(#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/, |
1140 | pattern: /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/, |
1116 | lookbehind: true, |
1141 | lookbehind: true, |
1117 | alias: 'keyword' |
1142 | alias: 'keyword' |
1118 | } |
1143 | } |
1119 | } |
1144 | } |
1120 | } |
1145 | } |
Line 1204... | Line 1229... | ||
1204 | } |
1229 | } |
1205 | ] |
1230 | ] |
1206 | }); |
1231 | }); |
1207 | }(Prism)); |
1232 | }(Prism)); |
1208 | Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp; |
1233 | Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp; |
1209 | }, |
- | |
1210 | {} |
- | |
1211 | ], |
- | |
1212 | 6: [ |
- | |
1213 | function (require, module, exports) { |
- | |
1214 | (function (Prism) { |
1234 | (function (Prism) { |
1215 | var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; |
1235 | var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; |
1216 | Prism.languages.css = { |
1236 | Prism.languages.css = { |
1217 | 'comment': /\/\*[\s\S]*?\*\//, |
1237 | 'comment': /\/\*[\s\S]*?\*\//, |
1218 | 'atrule': { |
1238 | 'atrule': { |
Line 1266... | Line 1286... | ||
1266 | if (markup) { |
1286 | if (markup) { |
1267 | markup.tag.addInlined('style', 'css'); |
1287 | markup.tag.addInlined('style', 'css'); |
1268 | markup.tag.addAttribute('style', 'css'); |
1288 | markup.tag.addAttribute('style', 'css'); |
1269 | } |
1289 | } |
1270 | }(Prism)); |
1290 | }(Prism)); |
1271 | }, |
- | |
1272 | {} |
- | |
1273 | ], |
- | |
1274 | 7: [ |
- | |
1275 | function (require, module, exports) { |
- | |
1276 | (function (Prism) { |
1291 | (function (Prism) { |
1277 | var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/; |
1292 | var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/; |
1278 | var classNamePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source; |
1293 | var classNamePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source; |
1279 | var className = { |
1294 | var className = { |
1280 | pattern: RegExp(classNamePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), |
1295 | pattern: RegExp(classNamePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), |
Line 1339... | Line 1354... | ||
1339 | lookbehind: true, |
1354 | lookbehind: true, |
1340 | inside: { 'punctuation': /\./ } |
1355 | inside: { 'punctuation': /\./ } |
1341 | } |
1356 | } |
1342 | }); |
1357 | }); |
1343 | }(Prism)); |
1358 | }(Prism)); |
1344 | }, |
- | |
1345 | {} |
- | |
1346 | ], |
- | |
1347 | 8: [ |
- | |
1348 | function (require, module, exports) { |
- | |
1349 | Prism.languages.javascript = Prism.languages.extend('clike', { |
1359 | Prism.languages.javascript = Prism.languages.extend('clike', { |
1350 | 'class-name': [ |
1360 | 'class-name': [ |
1351 | Prism.languages.clike['class-name'], |
1361 | Prism.languages.clike['class-name'], |
1352 | { |
1362 | { |
1353 | pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/, |
1363 | pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/, |
Line 1445... | Line 1455... | ||
1445 | if (Prism.languages.markup) { |
1455 | if (Prism.languages.markup) { |
1446 | Prism.languages.markup.tag.addInlined('script', 'javascript'); |
1456 | Prism.languages.markup.tag.addInlined('script', 'javascript'); |
1447 | Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, 'javascript'); |
1457 | Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, 'javascript'); |
1448 | } |
1458 | } |
1449 | Prism.languages.js = Prism.languages.javascript; |
1459 | Prism.languages.js = Prism.languages.javascript; |
- | 1460 | Prism.languages.markup = { |
|
- | 1461 | 'comment': { |
|
- | 1462 | pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, |
|
- | 1463 | greedy: true |
|
1450 | }, |
1464 | }, |
1451 | {} |
- | |
1452 | ], |
- | |
1453 | 9: [ |
- | |
1454 | function (require, module, exports) { |
- | |
1455 | (function (Prism) { |
- | |
1456 | function getPlaceholder(language, index) { |
- | |
1457 | return '___' + language.toUpperCase() + index + '___'; |
- | |
1458 | } |
- | |
1459 | Object.defineProperties(Prism.languages['markup-templating'] = {}, { |
- | |
1460 | buildPlaceholders: { |
- | |
1461 | value: function (env, language, placeholderPattern, replaceFilter) { |
- | |
1462 | if (env.language !== language) { |
- | |
1463 | return; |
- | |
1464 | } |
- | |
1465 | var tokenStack = env.tokenStack = []; |
- | |
1466 | env.code = env.code.replace(placeholderPattern, function (match) { |
- | |
1467 | if (typeof replaceFilter === 'function' && !replaceFilter(match)) { |
- | |
1468 | return match; |
- | |
1469 | } |
- | |
1470 | var i = tokenStack.length; |
- | |
1471 | var placeholder; |
- | |
1472 | while (env.code.indexOf(placeholder = getPlaceholder(language, i)) !== -1) { |
- | |
1473 | ++i; |
- | |
1474 | } |
- | |
1475 | tokenStack[i] = match; |
- | |
1476 | return placeholder; |
- | |
1477 | }); |
- | |
1478 | env.grammar = Prism.languages.markup; |
- | |
1479 | } |
1465 | 'prolog': { |
1480 | }, |
- | |
1481 | tokenizePlaceholders: { |
- | |
1482 | value: function (env, language) { |
- | |
1483 | if (env.language !== language || !env.tokenStack) { |
- | |
1484 | return; |
- | |
1485 | } |
- | |
1486 | env.grammar = Prism.languages[language]; |
- | |
1487 | var j = 0; |
- | |
1488 | var keys = Object.keys(env.tokenStack); |
- | |
1489 | function walkTokens(tokens) { |
- | |
1490 | for (var i = 0; i < tokens.length; i++) { |
- | |
1491 | if (j >= keys.length) { |
- | |
1492 | break; |
- | |
1493 | } |
- | |
1494 | var token = tokens[i]; |
- | |
1495 | if (typeof token === 'string' || token.content && typeof token.content === 'string') { |
- | |
1496 | var k = keys[j]; |
- | |
1497 | var t = env.tokenStack[k]; |
- | |
1498 | var s = typeof token === 'string' ? token : token.content; |
- | |
1499 | var placeholder = getPlaceholder(language, k); |
- | |
1500 | var index = s.indexOf(placeholder); |
- | |
1501 | if (index > -1) { |
- | |
1502 | ++j; |
- | |
1503 | var before = s.substring(0, index); |
- | |
1504 | var middle = new Prism.Token(language, Prism.tokenize(t, env.grammar), 'language-' + language, t); |
- | |
1505 | var after = s.substring(index + placeholder.length); |
- | |
1506 | var replacement = []; |
- | |
1507 | if (before) { |
- | |
1508 | replacement.push.apply(replacement, walkTokens([before])); |
- | |
1509 | } |
- | |
1510 | replacement.push(middle); |
- | |
1511 | if (after) { |
- | |
1512 | replacement.push.apply(replacement, walkTokens([after])); |
- | |
1513 | } |
- | |
1514 | if (typeof token === 'string') { |
- | |
1515 | tokens.splice.apply(tokens, [ |
- | |
1516 | i, |
1466 | pattern: /<\?[\s\S]+?\?>/, |
1517 | 1 |
- | |
1518 | ].concat(replacement)); |
- | |
1519 | } else { |
- | |
1520 | token.content = replacement; |
- | |
1521 | } |
- | |
1522 | } |
- | |
1523 | } else if (token.content) { |
- | |
1524 | walkTokens(token.content); |
- | |
1525 | } |
- | |
1526 | } |
- | |
1527 | return tokens; |
- | |
1528 | } |
1467 | greedy: true |
1529 | walkTokens(env.tokens); |
- | |
1530 | } |
- | |
1531 | } |
- | |
1532 | }); |
- | |
1533 | }(Prism)); |
- | |
1534 | }, |
1468 | }, |
1535 | {} |
- | |
1536 | ], |
- | |
1537 | 10: [ |
- | |
1538 | function (require, module, exports) { |
- | |
1539 | Prism.languages.markup = { |
- | |
1540 | 'comment': /<!--[\s\S]*?-->/, |
- | |
1541 | 'prolog': /<\?[\s\S]+?\?>/, |
- | |
1542 | 'doctype': { |
1469 | 'doctype': { |
1543 | pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, |
1470 | pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, |
1544 | greedy: true, |
1471 | greedy: true, |
1545 | inside: { |
1472 | inside: { |
1546 | 'internal-subset': { |
1473 | 'internal-subset': { |
Line 1552... | Line 1479... | ||
1552 | 'string': { |
1479 | 'string': { |
1553 | pattern: /"[^"]*"|'[^']*'/, |
1480 | pattern: /"[^"]*"|'[^']*'/, |
1554 | greedy: true |
1481 | greedy: true |
1555 | }, |
1482 | }, |
1556 | 'punctuation': /^<!|>$|[[\]]/, |
1483 | 'punctuation': /^<!|>$|[[\]]/, |
1557 | 'doctype-tag': /^DOCTYPE/, |
1484 | 'doctype-tag': /^DOCTYPE/i, |
1558 | 'name': /[^\s<>'"]+/ |
1485 | 'name': /[^\s<>'"]+/ |
1559 | } |
1486 | } |
1560 | }, |
1487 | }, |
- | 1488 | 'cdata': { |
|
1561 | 'cdata': /<!\[CDATA\[[\s\S]*?\]\]>/i, |
1489 | pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, |
- | 1490 | greedy: true |
|
- | 1491 | }, |
|
1562 | 'tag': { |
1492 | 'tag': { |
1563 | pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, |
1493 | pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, |
1564 | greedy: true, |
1494 | greedy: true, |
1565 | inside: { |
1495 | inside: { |
1566 | 'tag': { |
1496 | 'tag': { |
Line 1673... | Line 1603... | ||
1673 | Prism.languages.svg = Prism.languages.markup; |
1603 | Prism.languages.svg = Prism.languages.markup; |
1674 | Prism.languages.xml = Prism.languages.extend('markup', {}); |
1604 | Prism.languages.xml = Prism.languages.extend('markup', {}); |
1675 | Prism.languages.ssml = Prism.languages.xml; |
1605 | Prism.languages.ssml = Prism.languages.xml; |
1676 | Prism.languages.atom = Prism.languages.xml; |
1606 | Prism.languages.atom = Prism.languages.xml; |
1677 | Prism.languages.rss = Prism.languages.xml; |
1607 | Prism.languages.rss = Prism.languages.xml; |
1678 | }, |
- | |
1679 | {} |
- | |
1680 | ], |
- | |
1681 | 11: [ |
- | |
1682 | function (require, module, exports) { |
- | |
1683 | (function (Prism) { |
1608 | (function (Prism) { |
1684 | var comment = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/; |
1609 | var comment = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/; |
1685 | var constant = [ |
1610 | var constant = [ |
1686 | { |
1611 | { |
1687 | pattern: /\b(?:false|true)\b/i, |
1612 | pattern: /\b(?:false|true)\b/i, |
Line 1996... | Line 1921... | ||
1996 | }); |
1921 | }); |
1997 | Prism.hooks.add('after-tokenize', function (env) { |
1922 | Prism.hooks.add('after-tokenize', function (env) { |
1998 | Prism.languages['markup-templating'].tokenizePlaceholders(env, 'php'); |
1923 | Prism.languages['markup-templating'].tokenizePlaceholders(env, 'php'); |
1999 | }); |
1924 | }); |
2000 | }(Prism)); |
1925 | }(Prism)); |
2001 | }, |
- | |
2002 | {} |
- | |
2003 | ], |
- | |
2004 | 12: [ |
- | |
2005 | function (require, module, exports) { |
- | |
2006 | Prism.languages.python = { |
1926 | Prism.languages.python = { |
2007 | 'comment': { |
1927 | 'comment': { |
2008 | pattern: /(^|[^\\])#.*/, |
1928 | pattern: /(^|[^\\])#.*/, |
2009 | lookbehind: true |
1929 | lookbehind: true |
2010 | }, |
1930 | }, |
Line 2057... | Line 1977... | ||
2057 | inside: { 'punctuation': /\./ } |
1977 | inside: { 'punctuation': /\./ } |
2058 | }, |
1978 | }, |
2059 | 'keyword': /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, |
1979 | 'keyword': /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, |
2060 | 'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, |
1980 | 'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, |
2061 | 'boolean': /\b(?:True|False|None)\b/, |
1981 | 'boolean': /\b(?:True|False|None)\b/, |
2062 | 'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i, |
1982 | 'number': /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?\b/i, |
2063 | 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, |
1983 | 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, |
2064 | 'punctuation': /[{}[\];(),.:]/ |
1984 | 'punctuation': /[{}[\];(),.:]/ |
2065 | }; |
1985 | }; |
2066 | Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python; |
1986 | Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python; |
2067 | Prism.languages.py = Prism.languages.python; |
1987 | Prism.languages.py = Prism.languages.python; |
2068 | }, |
- | |
2069 | {} |
- | |
2070 | ], |
- | |
2071 | 13: [ |
- | |
2072 | function (require, module, exports) { |
- | |
2073 | (function (Prism) { |
1988 | (function (Prism) { |
2074 | Prism.languages.ruby = Prism.languages.extend('clike', { |
1989 | Prism.languages.ruby = Prism.languages.extend('clike', { |
2075 | 'comment': [ |
1990 | 'comment': [ |
2076 | /#.*/, |
1991 | /#.*/, |
2077 | { |
1992 | { |
Line 2178... | Line 2093... | ||
2178 | } |
2093 | } |
2179 | } |
2094 | } |
2180 | ]; |
2095 | ]; |
2181 | Prism.languages.rb = Prism.languages.ruby; |
2096 | Prism.languages.rb = Prism.languages.ruby; |
2182 | }(Prism)); |
2097 | }(Prism)); |
2183 | }, |
- | |
2184 | {} |
- | |
2185 | ], |
- | |
2186 | 14: [ |
- | |
2187 | function (require, module, exports) { |
2098 | var Prism$1 = prismCore.exports; |
2188 | var Prism = require('prismjs/components/prism-core'); |
- | |
2189 | require('prismjs/components/prism-clike'); |
- | |
2190 | require('prismjs/components/prism-markup-templating'); |
- | |
2191 | require('prismjs/components/prism-c'); |
- | |
2192 | require('prismjs/components/prism-cpp'); |
- | |
2193 | require('prismjs/components/prism-csharp'); |
- | |
2194 | require('prismjs/components/prism-css'); |
- | |
2195 | require('prismjs/components/prism-java'); |
- | |
2196 | require('prismjs/components/prism-javascript'); |
- | |
2197 | require('prismjs/components/prism-markup'); |
- | |
2198 | require('prismjs/components/prism-php'); |
- | |
2199 | require('prismjs/components/prism-python'); |
- | |
2200 | require('prismjs/components/prism-ruby'); |
- | |
2201 | module.exports = { boltExport: Prism }; |
2099 | var prismjs = { boltExport: Prism$1 }; |
2202 | }, |
- | |
2203 | { |
- | |
2204 | 'prismjs/components/prism-c': 1, |
- | |
2205 | 'prismjs/components/prism-clike': 2, |
- | |
2206 | 'prismjs/components/prism-core': 3, |
- | |
2207 | 'prismjs/components/prism-cpp': 4, |
- | |
2208 | 'prismjs/components/prism-csharp': 5, |
- | |
2209 | 'prismjs/components/prism-css': 6, |
- | |
2210 | 'prismjs/components/prism-java': 7, |
- | |
2211 | 'prismjs/components/prism-javascript': 8, |
- | |
2212 | 'prismjs/components/prism-markup': 10, |
- | |
2213 | 'prismjs/components/prism-markup-templating': 9, |
- | |
2214 | 'prismjs/components/prism-php': 11, |
- | |
2215 | 'prismjs/components/prism-python': 12, |
- | |
2216 | 'prismjs/components/prism-ruby': 13 |
- | |
2217 | } |
- | |
2218 | ] |
- | |
2219 | }, {}, [14])(14); |
2100 | return prismjs; |
2220 | })); |
2101 | })); |
2221 | var prism = window.Prism; |
2102 | var prism = window.Prism; |
2222 | window.Prism = oldprism; |
2103 | window.Prism = oldprism; |
2223 | return prism; |
2104 | return prism; |
2224 | }(undefined, exports$1, module, undefined)); |
2105 | }(undefined, exports$1, module)); |
2225 | var Prism$1 = module.exports.boltExport; |
2106 | var Prism$1 = module.exports.boltExport; |
2226 | 2107 | ||
2227 | var getLanguages$1 = function (editor) { |
2108 | var getLanguages$1 = function (editor) { |
2228 | return editor.getParam('codesample_languages'); |
2109 | return editor.getParam('codesample_languages'); |
2229 | }; |
2110 | }; |