Mercurial
view third_party/highlight/es/languages/json.js @ 279:b3b547563ec7
Add Google connector service and agent wiki
Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 22:22:36 -0700 |
| parents | 2db6253f355d |
| children |
line wrap: on
line source
/*! `json` grammar compiled for Highlight.js 11.11.1 */ var hljsGrammar = (function () { 'use strict'; /* Language: JSON Description: JSON (JavaScript Object Notation) is a lightweight data-interchange format. Author: Ivan Sagalaev <[email protected]> Website: http://www.json.org Category: common, protocols, web */ function json(hljs) { const ATTRIBUTE = { className: 'attr', begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/, relevance: 1.01 }; const PUNCTUATION = { match: /[{}[\],:]/, className: "punctuation", relevance: 0 }; const LITERALS = [ "true", "false", "null" ]; // NOTE: normally we would rely on `keywords` for this but using a mode here allows us // - to use the very tight `illegal: \S` rule later to flag any other character // - as illegal indicating that despite looking like JSON we do not truly have // - JSON and thus improve false-positively greatly since JSON will try and claim // - all sorts of JSON looking stuff const LITERALS_MODE = { scope: "literal", beginKeywords: LITERALS.join(" "), }; return { name: 'JSON', aliases: ['jsonc'], keywords:{ literal: LITERALS, }, contains: [ ATTRIBUTE, PUNCTUATION, hljs.QUOTE_STRING_MODE, LITERALS_MODE, hljs.C_NUMBER_MODE, hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE ], illegal: '\\S' }; } return json; })(); ; export default hljsGrammar;