//----------------------------------------------------------------------------1// Copyright (C) 2012 The IPython Development Team2//3// Distributed under the terms of the BSD License. The full license is in4// the file COPYING, distributed as part of this software.5//----------------------------------------------------------------------------67//============================================================================8// Notebook9//============================================================================1011/**12* @module IPython13* @namespace IPython14**/1516var IPython = (function (IPython) {17"use strict";18/**19* A place where some stuff can be confugured.20*21* @class config22* @static23*24**/25var default_config = {26/**27* Dictionary of object to autodetect highlight mode for code cell.28* Item of the dictionnary should take the form :29*30* key : {'reg':[list_of_regexp]}31*32* where `key` will be the code mirror mode name33* and `list_of_regexp` should be a list of regext that should match34* the first line of the cell to trigger this mode.35*36* if `key` is prefixed by the `magic_` prefix the codemirror `mode`37* will be applied only at the end of the first line38*39* @attribute cell_magic_highlight40* @example41* This would trigger javascript mode42* from the second line if first line start with `%%javascript` or `%%jsmagic`43*44* cell_magic_highlight['magic_javascript'] = {'reg':[/^%%javascript/,/^%%jsmagic/]}45* @example46* This would trigger javascript mode47* from the second line if first line start with `var`48*49* cell_magic_highlight['javascript'] = {'reg':[/^var/]}50*/51cell_magic_highlight : {52'magic_javascript' :{'reg':[/^%%javascript/]}53,'magic_perl' :{'reg':[/^%%perl/]}54,'magic_ruby' :{'reg':[/^%%ruby/]}55,'magic_python' :{'reg':[/^%%python3?/]}56,'magic_shell' :{'reg':[/^%%bash/]}57,'magic_r' :{'reg':[/^%%R/]}58,'magic_text/x-cython' :{'reg':[/^%%cython/]}59},6061/**62* same as `cell_magic_highlight` but for raw cells63* @attribute raw_cell_highlight64*/65raw_cell_highlight : {66'diff' :{'reg':[/^diff/]}67},6869};7071// use the same method to merge user configuration72IPython.config = {};73$.extend(IPython.config, default_config);7475return IPython;7677}(IPython));78798081