kubernetes-handbook/node_modules/prismjs/components/prism-json.js

26 lines
534 B
JavaScript

// https://www.json.org/json-en.html
Prism.languages.json = {
'property': {
pattern: /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
greedy: true
},
'string': {
pattern: /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
greedy: true
},
'comment': {
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
greedy: true
},
'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
'punctuation': /[{}[\],]/,
'operator': /:/,
'boolean': /\b(?:true|false)\b/,
'null': {
pattern: /\bnull\b/,
alias: 'keyword'
}
};
Prism.languages.webmanifest = Prism.languages.json;