diff --git a/components/prism-json.js b/components/prism-json.js index 6ae91b4c13..70f0622b8e 100644 --- a/components/prism-json.js +++ b/components/prism-json.js @@ -12,7 +12,10 @@ Prism.languages.json = { 'punctuation': /[{}[\],]/, 'operator': /:/, 'boolean': /\b(?:true|false)\b/, - 'null': /\bnull\b/ + 'null': { + pattern: /\bnull\b/, + alias: 'keyword' + } }; Prism.languages.jsonp = Prism.languages.json; diff --git a/components/prism-json.min.js b/components/prism-json.min.js index 4c3c1faab4..2dfd523497 100644 --- a/components/prism-json.min.js +++ b/components/prism-json.min.js @@ -1 +1 @@ -Prism.languages.json={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,"boolean":/\b(?:true|false)\b/,"null":/\bnull\b/},Prism.languages.jsonp=Prism.languages.json; \ No newline at end of file +Prism.languages.json={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,"boolean":/\b(?:true|false)\b/,"null":{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.jsonp=Prism.languages.json; \ No newline at end of file