Merging JSONP definition with JSON JSONP alias added to JSON.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
diff --git a/components/prism-json.js b/components/prism-json.js
index f2750ad..509cc51 100644
--- a/components/prism-json.js
+++ b/components/prism-json.js
@@ -2,8 +2,16 @@ Prism.languages.json = {
'property': /"(\b|\B)[\w-]+"(?=\s*:)/ig,
'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,
'string': /"(?!:)(\\?[^'"])*?"(?!:)/g,
- 'punctuation': /[{}[\],]/g,
+ 'function': {
+ pattern: /[a-z0-9_]+\(/ig,
+ inside: {
+ punctuation: /\(/
+ }
+ },
+ 'punctuation': /[{}[\]);,]/g,
'operator': /:/g,
'boolean': /\b(true|false)\b/gi,
'null': /\bnull\b/gi,
-};
\ No newline at end of file
+};
+
+Prism.languages.jsonp;
\ No newline at end of file
diff --git a/components/prism-jsonp.js b/components/prism-jsonp.js
deleted file mode 100644
index cf2055f..0000000
--- a/components/prism-jsonp.js
+++ /dev/null
@@ -1,9 +0,0 @@
-Prism.languages.jsonp = Prism.languages.extend('json',{
- 'function': {
- pattern: /[a-z0-9_]+\(/ig,
- inside: {
- punctuation: /\(/
- }
- },
- 'punctuation': /[{}[\]);,]/g,
-});
\ No newline at end of file