/** * Author: Robert Galovic, AVINOC - www.avinoc.com * License: GPL-2 | GPL-3 * JSON brush for confluence syntaxhighlighter */ SyntaxHighlighter.brushes.JSON = function() { var key_bool = 'true false null NULL'; this.regexList = [ { regex: new RegExp(this.getKeywords(key_bool), 'gm'), css: 'value' }, { regex: /[^\D](\d?\.?\d+)/gm, css: 'constants' }, { regex: /((\"[\w]+\S*[^\\]\"))(?=[\:]|\s\:)/gm, css: 'variable' }, { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, { regex: /((\'[\w]+\S*[^\\]\'))(?=[\:]|\s\:)/gm, css: 'comments' }, { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'comments' }, ]; }; SyntaxHighlighter.brushes.JSON.prototype = new SyntaxHighlighter.Highlighter(); SyntaxHighlighter.brushes.JSON.aliases = ['json', 'Json', 'JSON'];