File geshi/geshi/javascript.php
Last commit: Fri Nov 23 00:12:00 2007 +0100 dankert Farbige Darstellung von Code-Bl?cken mit Hilfe der Bibliothek GESHI.
1 <?php 2 /************************************************************************************* 3 * javascript.php 4 * -------------- 5 * Author: Ben Keen (ben.keen@gmail.com) 6 * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter) 7 * Release Version: 1.0.7.20 8 * Date Started: 2004/06/20 9 * 10 * JavaScript language file for GeSHi. 11 * 12 * CHANGES 13 * ------- 14 * 2004/11/27 (1.0.1) 15 * - Added support for multiple object splitters 16 * 2004/10/27 (1.0.0) 17 * - First Release 18 * 19 * TODO (updated 2004/11/27) 20 * ------------------------- 21 * 22 ************************************************************************************* 23 * 24 * This file is part of GeSHi. 25 * 26 * GeSHi is free software; you can redistribute it and/or modify 27 * it under the terms of the GNU General Public License as published by 28 * the Free Software Foundation; either version 2 of the License, or 29 * (at your option) any later version. 30 * 31 * GeSHi is distributed in the hope that it will be useful, 32 * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 * GNU General Public License for more details. 35 * 36 * You should have received a copy of the GNU General Public License 37 * along with GeSHi; if not, write to the Free Software 38 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 39 * 40 ************************************************************************************/ 41 42 $language_data = array ( 43 'LANG_NAME' => 'Javascript', 44 'COMMENT_SINGLE' => array(1 => '//'), 45 'COMMENT_MULTI' => array('/*' => '*/'), 46 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 47 'QUOTEMARKS' => array("'", '"'), 48 'ESCAPE_CHAR' => '\\', 49 'KEYWORDS' => array( 50 1 => array( 51 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', 52 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', 53 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', 54 'while', 'write', 'with' 55 ), 56 2 => array( 57 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', 58 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', 59 'protected', 'public', 'super', 'true', 'use', 'var' 60 ), 61 3 => array( 62 63 // common functions for Window object 64 'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home', 65 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', 66 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status', 67 'stop', 68 ) 69 ), 70 'SYMBOLS' => array( 71 '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' 72 ), 73 'CASE_SENSITIVE' => array( 74 GESHI_COMMENTS => false, 75 1 => false, 76 2 => false, 77 3 => false 78 ), 79 'STYLES' => array( 80 'KEYWORDS' => array( 81 1 => 'color: #000066; font-weight: bold;', 82 2 => 'color: #003366; font-weight: bold;', 83 3 => 'color: #000066;' 84 ), 85 'COMMENTS' => array( 86 1 => 'color: #009900; font-style: italic;', 87 'MULTI' => 'color: #009900; font-style: italic;' 88 ), 89 'ESCAPE_CHAR' => array( 90 0 => 'color: #000099; font-weight: bold;' 91 ), 92 'BRACKETS' => array( 93 0 => 'color: #66cc66;' 94 ), 95 'STRINGS' => array( 96 0 => 'color: #3366CC;' 97 ), 98 'NUMBERS' => array( 99 0 => 'color: #CC0000;' 100 ), 101 'METHODS' => array( 102 1 => 'color: #006600;' 103 ), 104 'SYMBOLS' => array( 105 0 => 'color: #66cc66;' 106 ), 107 'REGEXPS' => array( 108 0 => 'color: #0066FF;' 109 ), 110 'SCRIPT' => array( 111 0 => '', 112 1 => '', 113 2 => '', 114 3 => '' 115 ) 116 ), 117 'URLS' => array( 118 1 => '', 119 2 => '', 120 3 => '' 121 ), 122 'OOLANG' => true, 123 'OBJECT_SPLITTERS' => array( 124 1 => '.' 125 ), 126 'REGEXPS' => array( 127 0 => "/.*/([igm]*)?" // matches js reg exps 128 ), 129 'STRICT_MODE_APPLIES' => GESHI_MAYBE, 130 'SCRIPT_DELIMITERS' => array( 131 0 => array( 132 '<script type="text/javascript">' => '</script>' 133 ), 134 1 => array( 135 '<script language="javascript">' => '</script>' 136 ) 137 ), 138 'HIGHLIGHT_STRICT_BLOCK' => array( 139 0 => true, 140 1 => true 141 ) 142 ); 143 144 ?>
Downloadgeshi/geshi/javascript.php
History Fri, 23 Nov 2007 00:12:00 +0100 dankert Farbige Darstellung von Code-Bl?cken mit Hilfe der Bibliothek GESHI.