]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/json.js
1 /*! `json` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Description: JSON (JavaScript Object Notation) is a lightweight data-interchange format.
8 Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
9 Website: http://www.json.org
10 Category: common, protocols, web
16 begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
21 className: "punctuation",
29 // NOTE: normally we would rely on `keywords` for this but using a mode here allows us
30 // - to use the very tight `illegal: \S` rule later to flag any other character
31 // - as illegal indicating that despite looking like JSON we do not truly have
32 // - JSON and thus improve false-positively greatly since JSON will try and claim
33 // - all sorts of JSON looking stuff
34 const LITERALS_MODE
= {
36 beginKeywords: LITERALS
.join(" "),
48 hljs
.QUOTE_STRING_MODE
,
51 hljs
.C_LINE_COMMENT_MODE
,
52 hljs
.C_BLOCK_COMMENT_MODE
62 export default hljsGrammar
;