blob: c00a8a0b1ff4a85fea1cdeb1efbc929ad500aee4 [file] [log] [blame]
{"version":3,"sources":["webpack://lib/./node_modules/react-syntax-highlighter/node_modules/highlight.js/lib/languages/json.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,qCAAqC,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","file":"react-syntax-highlighter_languages_highlight_json.render-page.js","sourcesContent":["/*\nLanguage: JSON\nDescription: JSON (JavaScript Object Notation) is a lightweight data-interchange format.\nAuthor: Ivan Sagalaev <maniac@softwaremaniacs.org>\nWebsite: http://www.json.org\nCategory: common, protocols\n*/\n\nfunction json(hljs) {\n var LITERALS = {literal: 'true false null'};\n var ALLOWED_COMMENTS = [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE\n ];\n var TYPES = [\n hljs.QUOTE_STRING_MODE,\n hljs.C_NUMBER_MODE\n ];\n var VALUE_CONTAINER = {\n end: ',', endsWithParent: true, excludeEnd: true,\n contains: TYPES,\n keywords: LITERALS\n };\n var OBJECT = {\n begin: '{', end: '}',\n contains: [\n {\n className: 'attr',\n begin: /\"/, end: /\"/,\n contains: [hljs.BACKSLASH_ESCAPE],\n illegal: '\\\\n',\n },\n hljs.inherit(VALUE_CONTAINER, {begin: /:/})\n ].concat(ALLOWED_COMMENTS),\n illegal: '\\\\S'\n };\n var ARRAY = {\n begin: '\\\\[', end: '\\\\]',\n contains: [hljs.inherit(VALUE_CONTAINER)], // inherit is a workaround for a bug that makes shared modes with endsWithParent compile only the ending of one of the parents\n illegal: '\\\\S'\n };\n TYPES.push(OBJECT, ARRAY);\n ALLOWED_COMMENTS.forEach(function(rule) {\n TYPES.push(rule);\n });\n return {\n name: 'JSON',\n contains: TYPES,\n keywords: LITERALS,\n illegal: '\\\\S'\n };\n}\n\nmodule.exports = json;\n"],"sourceRoot":""}