recipes.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. /*
  2. ===============================================================================
  3. Chili is the jQuery code highlighter plugin
  4. ...............................................................................
  5. LICENSE: http://www.opensource.org/licenses/mit-license.php
  6. WEBSITE: http://noteslog.com/chili/
  7. Copyright 2008 / Andrea Ercolino
  8. ===============================================================================
  9. */
  10. ChiliBook.recipeLoading = false;
  11. ChiliBook.recipes[ "php.js" ] =
  12. /* ----------------------------------------------------------------------------
  13. * this recipe uses a little trick for highlighting php code
  14. * 1: replace each php snippet with a placeholder
  15. * 2: highlight html without php and php snippets apart
  16. * 3: replace each placeholder with its highlighted php snippet
  17. *
  18. * the trick is not perfect only if the html without php is broken
  19. * however, in such a case many highlighters get fooled but Chili does not
  20. *
  21. * ---
  22. * this recipe has been adapted for working with Safari
  23. * in fact, Safari cannot match more than 101236 characters with a lazy star
  24. * --------------------------------------------------------------------------*/
  25. {
  26. _name: "php"
  27. , _case: true
  28. , _main: {
  29. all: {
  30. _match: /[\w\W]*/
  31. , _replace: function( all ) {
  32. var placeholder = String.fromCharCode(0);
  33. var blocks = [];
  34. var that = this;
  35. var no_php_1 = all.replace( /<\?[^?]*\?+(?:[^>][^?]*\?+)*>/g, function( block ) {
  36. blocks.push( that.x( block, '/block/php_1' ) );
  37. return placeholder;
  38. } );
  39. var no_php_2 = no_php_1.replace( /^[^?]*\?+(?:[^>][^?]*\?+)*>|<\?[\w\W]*$/g, function( block ) {
  40. blocks.push( that.x( block, '/block/php_2' ) );
  41. return placeholder;
  42. } );
  43. if( blocks.length ) {
  44. var html = this.x( no_php_2, 'html' );
  45. var count = 0;
  46. return html.replace( new RegExp( placeholder, "g" ), function() {
  47. return blocks[ count++ ];
  48. } );
  49. }
  50. else {
  51. return this.x( all, '/php' );
  52. }
  53. }
  54. }
  55. }
  56. , block: {
  57. php_1: { // --- <? +++ ?> ---
  58. _match: /(<\?(?:php\b)?)([^?]*\?+(?:[^>][^?]*\?+)*>)/
  59. , _replace: function( all, open, content ) {
  60. return "<span class='start'>" + this.x( open ) + "</span>"
  61. + this.x( content.replace( /\?>$/, '' ), '/php' )
  62. + "<span class='end'>" + this.x( '?>' ) + "</span>";
  63. }
  64. , _style: {
  65. start: "color: red; font-weight: bold"
  66. , end: "color: red;"
  67. }
  68. }
  69. , php_2: { // +++ ?> --- <? +++
  70. _match: /([^?]*\?+(?:[^>][^?]*\?+)*>)|(<\?(?:php\b)?)([\w\W]*)/
  71. , _replace: function( all, content, open2, content2 ) {
  72. if( open2 ) {
  73. return "<span class='start'>" + this.x( open2 ) + "</span>"
  74. + this.x( content2, '/php' );
  75. }
  76. else {
  77. return this.x( content.replace( /\?>$/, '' ), '/php' )
  78. + "<span class='end'>" + this.x( '?>' ) + "</span>";
  79. }
  80. }
  81. , _style: {
  82. start: "color: red; font-weight: bold"
  83. , end: "color: red;"
  84. }
  85. }
  86. }
  87. , php: {
  88. mlcom: {
  89. _match: /\/\*[^*]*\*+([^\/][^*]*\*+)*\//
  90. , _style: "color: gray;"
  91. }
  92. , com: {
  93. _match: /(?:\/\/.*)|(?:[^\\]\#.*)/
  94. , _style: "color: green;"
  95. }
  96. , string1: {
  97. _match: /\'[^\'\\]*(?:\\.[^\'\\]*)*\'/
  98. , _style: "color: purple;"
  99. }
  100. , string2: {
  101. _match: /\"[^\"\\]*(?:\\.[^\"\\]*)*\"/
  102. , _style: "color: fuchsia;"
  103. }
  104. , value: {
  105. _match: /\b(?:[Nn][Uu][Ll][Ll]|[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])\b/
  106. , _style: "color: gray; font-weight: bold;"
  107. }
  108. , number: {
  109. _match: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/
  110. , _style: "color: red;"
  111. }
  112. , const1: {
  113. _match: /\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\b/
  114. , _style: "color: red;"
  115. }
  116. , const2: {
  117. _match: /\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR))\b/
  118. , _style: "color: red;"
  119. }
  120. , global: {
  121. _match: /(?:\$GLOBALS|\$_COOKIE|\$_ENV|\$_FILES|\$_GET|\$_POST|\$_REQUEST|\$_SERVER|\$_SESSION|\$php_errormsg)\b/
  122. , _style: "color: red;"
  123. }
  124. , keyword: {
  125. _match: /\b(?:__CLASS__|__FILE__|__FUNCTION__|__LINE__|__METHOD__|abstract|and|array|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exception|exit|extends|extends|final|for|foreach|function|global|if|implements|include|include_once|interface|isset|list|new|old_function|or|php_user_filter|print|private|protected|public|require|require_once|return|static|switch|this|throw|try|unset|use|var|while|xor)\b/
  126. , _style: "color: navy; font-weight: bold;"
  127. }
  128. , variable: {
  129. _match: /\$(\w+)/
  130. , _replace: '<span class="keyword">$</span><span class="variable">$1</span>'
  131. , _style: "color: #4040c2;"
  132. }
  133. , heredoc: {
  134. _match: /(\<\<\<\s*)(\w+)((?:(?!\2).*\n)+)(\2)\b/
  135. , _replace: '<span class="keyword">$1</span><span class="string1">$2</span><span class="string2">$3</span><span class="string1">$4</span>'
  136. }
  137. }
  138. }
  139. ChiliBook.recipes[ "html.js" ] =
  140. {
  141. _name: 'html'
  142. , _case: false
  143. , _main: {
  144. doctype: {
  145. _match: /<!DOCTYPE\b[\w\W]*?>/
  146. , _style: "color: #CC6600;"
  147. }
  148. , ie_style: {
  149. _match: /(<!--\[[^\]]*\]>)([\w\W]*?)(<!\[[^\]]*\]-->)/
  150. , _replace: function( all, open, content, close ) {
  151. return "<span class='ie_style'>" + this.x( open ) + "</span>"
  152. + this.x( content, '//style' )
  153. + "<span class='ie_style'>" + this.x( close ) + "</span>";
  154. }
  155. , _style: "color: DarkSlateGray; font-weight: bold;"
  156. }
  157. , comment: {
  158. _match: /<!--[\w\W]*?-->/
  159. , _style: "color: #4040c2;"
  160. }
  161. , script: {
  162. _match: /(<script\s+[^>]*>)([\w\W]*?)(<\/script\s*>)/
  163. , _replace: function( all, open, content, close ) {
  164. return this.x( open, '//tag_start' )
  165. + this.x( content, 'js' )
  166. + this.x( close, '//tag_end' );
  167. }
  168. }
  169. , style: {
  170. _match: /(<style\s+[^>]*>)([\w\W]*?)(<\/style\s*>)/
  171. , _replace: function( all, open, content, close ) {
  172. return this.x( open, '//tag_start' )
  173. + this.x( content, 'css' )
  174. + this.x( close, '//tag_end' );
  175. }
  176. }
  177. // matches a starting tag of an element (with attrs)
  178. // like "<div ... >" or "<img ... />"
  179. , tag_start: {
  180. _match: /(<\w+)((?:[?%]>|[\w\W])*?)(\/>|>)/
  181. , _replace: function( all, open, content, close ) {
  182. return "<span class='tag_start'>" + this.x( open ) + "</span>"
  183. + this.x( content, '/tag_attrs' )
  184. + "<span class='tag_start'>" + this.x( close ) + "</span>";
  185. }
  186. , _style: "color: navy; font-weight: bold;"
  187. }
  188. // matches an ending tag
  189. // like "</div>"
  190. , tag_end: {
  191. _match: /<\/\w+\s*>|\/>/
  192. , _style: "color: navy;"
  193. }
  194. , entity: {
  195. _match: /&\w+?;/
  196. , _style: "color: blue;"
  197. }
  198. }
  199. , tag_attrs: {
  200. // matches a name/value pair
  201. attr: {
  202. // before in $1, name in $2, between in $3, value in $4
  203. _match: /(\W*?)([\w-]+)(\s*=\s*)((?:\'[^\']*(?:\\.[^\']*)*\')|(?:\"[^\"]*(?:\\.[^\"]*)*\"))/
  204. , _replace: "$1<span class='attr_name'>$2</span>$3<span class='attr_value'>$4</span>"
  205. , _style: { attr_name: "color: green;", attr_value: "color: maroon;" }
  206. }
  207. }
  208. };
  209. ChiliBook.recipes[ "js.js" ] =
  210. {
  211. _name: 'js'
  212. , _case: true
  213. , _main: {
  214. ml_comment: {
  215. _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
  216. , _style: 'color: gray;'
  217. }
  218. , sl_comment: {
  219. _match: /\/\/.*/
  220. , _style: 'color: green;'
  221. }
  222. , string: {
  223. _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
  224. , _style: 'color: teal;'
  225. }
  226. , num: {
  227. _match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/
  228. , _style: 'color: red;'
  229. }
  230. , reg_not: { //this prevents "a / b / c" to be interpreted as a reg_exp
  231. _match: /(?:\w+\s*)\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*(?:\s*\w+)/
  232. , _replace: function( all ) {
  233. return this.x( all, '//num' );
  234. }
  235. }
  236. , reg_exp: {
  237. _match: /\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/
  238. , _style: 'color: maroon;'
  239. }
  240. , brace: {
  241. _match: /[\{\}]/
  242. , _style: 'color: red; font-weight: bold;'
  243. }
  244. , statement: {
  245. _match: /\b(with|while|var|try|throw|switch|return|if|for|finally|else|do|default|continue|const|catch|case|break)\b/
  246. , _style: 'color: navy; font-weight: bold;'
  247. }
  248. , error: {
  249. _match: /\b(URIError|TypeError|SyntaxError|ReferenceError|RangeError|EvalError|Error)\b/
  250. , _style: 'color: Coral;'
  251. }
  252. , object: {
  253. _match: /\b(String|RegExp|Object|Number|Math|Function|Date|Boolean|Array)\b/
  254. , _style: 'color: DeepPink;'
  255. }
  256. , property: {
  257. _match: /\b(undefined|arguments|NaN|Infinity)\b/
  258. , _style: 'color: Purple; font-weight: bold;'
  259. }
  260. , 'function': {
  261. _match: /\b(parseInt|parseFloat|isNaN|isFinite|eval|encodeURIComponent|encodeURI|decodeURIComponent|decodeURI)\b/
  262. , _style: 'color: olive;'
  263. }
  264. , operator: {
  265. _match: /\b(void|typeof|this|new|instanceof|in|function|delete)\b/
  266. , _style: 'color: RoyalBlue; font-weight: bold;'
  267. }
  268. , liveconnect: {
  269. _match: /\b(sun|netscape|java|Packages|JavaPackage|JavaObject|JavaClass|JavaArray|JSObject|JSException)\b/
  270. , _style: 'text-decoration: overline;'
  271. }
  272. }
  273. };
  274. ChiliBook.recipes[ "css.js" ] =
  275. {
  276. _name: 'css'
  277. , _case: true
  278. , _main: {
  279. comment: {
  280. _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
  281. , _style: "color: olive;"
  282. }
  283. , directive: {
  284. _match: /@\w+/
  285. , _style: "color: fuchsia;"
  286. }
  287. , url: {
  288. _match: /\b(url\s*\()([^)]+)(\))/
  289. , _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
  290. , _style: "color: fuchsia;"
  291. }
  292. , block: {
  293. _match: /\{([\w\W]*?)\}/
  294. , _replace: function( all, pairs ) {
  295. return '{' + this.x( pairs, '/definition' ) + '}';
  296. }
  297. }
  298. , 'class': {
  299. _match: /\.\w+/
  300. , _style: "color: #CC0066; font-weight: bold;"
  301. }
  302. , id: {
  303. _match: /#\w+/
  304. , _style: "color: IndianRed; font-weight: bold;"
  305. }
  306. , pseudo: {
  307. _match: /:\w+/
  308. , _style: "color: #CC9900;"
  309. }
  310. , element: {
  311. _match: /\w+/
  312. , _style: "color: Purple; font-weight: bold;"
  313. }
  314. }
  315. , definition: {
  316. comment: {
  317. _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
  318. }
  319. , property: {
  320. _match: /\b(?:zoom|z-index|writing-mode|word-wrap|word-spacing|word-break|width|widows|white-space|volume|voice-family|visibility|vertical-align|unicode-bidi|top|text-underline-position|text-transform|text-shadow|text-overflow|text-kashida-space|text-justify|text-indent|text-decoration|text-autospace|text-align-last|text-align|table-layout|stress|speech-rate|speak-punctuation|speak-numeral|speak-header|speak|size|scrollbar-track-color|scrollbar-shadow-color|scrollbar-highlight-color|scrollbar-face-color|scrollbar-dark-shadow-color|scrollbar-base-color|scrollbar-arrow-color|scrollbar-3d-light-color|ruby-position|ruby-overhang|ruby-align|right|richness|quotes|position|play-during|pitch-range|pitch|pause-before|pause-after|pause|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-Y|overflow-X|overflow|outline-width|outline-style|outline-color|outline|orphans|min-width|min-height|max-width|max-height|marks|marker-offset|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|line-break|letter-spacing|left|layout-grid-type|layout-grid-mode|layout-grid-line|layout-grid-char-spacing|layout-grid-char|layout-grid|layout-flow|layer-background-image|layer-background-color|include-source|ime-mode|height|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float|filter|empty-cells|elevation|display|direction|cursor|cue-before|cue-after|cue|counter-reset|counter-increment|content|color|clip|clear|caption-side|bottom|border-width|border-top-width|border-top-style|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-left-width|border-left-style|border-left-color|border-left|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-color|border-bottom|border|behavior|background-repeat|background-position-y|background-position-x|background-position|background-image|background-color|background-attachment|background|azimuth|accelerator)\s*:/
  321. , _style: "color: #330066;"
  322. }
  323. , special: {
  324. _match: /\b(?:-use-link-source|-set-link-source|-replace|-moz-user-select|-moz-user-modify|-moz-user-input|-moz-user-focus|-moz-outline-width|-moz-outline-style|-moz-outline-color|-moz-outline|-moz-opacity|-moz-border-top-colors|-moz-border-right-colors|-moz-border-radius-topright|-moz-border-radius-topleft|-moz-border-radius-bottomright|-moz-border-radius-bottomleft|-moz-border-radius|-moz-border-left-colors|-moz-border-bottom-colors|-moz-binding)\s*:/
  325. , _style: "color: #330066; text-decoration: underline;"
  326. }
  327. , url: {
  328. _match: /\b(url\s*\()([^)]+)(\))/
  329. , _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
  330. }
  331. , value: {
  332. _match: /\b(?:xx-small|xx-large|x-soft|x-small|x-slow|x-low|x-loud|x-large|x-high|x-fast|wider|wait|w-resize|visible|url|uppercase|upper-roman|upper-latin|upper-alpha|underline|ultra-expanded|ultra-condensed|tv|tty|transparent|top|thin|thick|text-top|text-bottom|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table-caption|sw-resize|super|sub|status-bar|static|square|spell-out|speech|solid|soft|smaller|small-caption|small-caps|small|slower|slow|silent|show|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|s-resize|run-in|rtl|rightwards|right-side|right|ridge|rgb|repeat-y|repeat-x|repeat|relative|projection|print|pre|portrait|pointer|overline|outside|outset|open-quote|once|oblique|nw-resize|nowrap|normal|none|no-repeat|no-open-quote|no-close-quote|ne-resize|narrower|n-resize|move|mix|middle|message-box|medium|marker|ltr|lowercase|lower-roman|lower-latin|lower-greek|lower-alpha|lower|low|loud|local|list-item|line-through|lighter|level|leftwards|left-side|left|larger|large|landscape|justify|italic|invert|inside|inset|inline-table|inline|icon|higher|high|hide|hidden|help|hebrew|handheld|groove|format|fixed|faster|fast|far-right|far-left|fantasy|extra-expanded|extra-condensed|expanded|embossed|embed|e-resize|double|dotted|disc|digits|default|decimal-leading-zero|decimal|dashed|cursive|crosshair|cross|crop|counters|counter|continuous|condensed|compact|collapse|code|close-quote|circle|center-right|center-left|center|caption|capitalize|braille|bottom|both|bolder|bold|block|blink|bidi-override|below|behind|baseline|avoid|auto|aural|attr|armenian|always|all|absolute|above)\b/
  333. , _style: "color: #3366FF;"
  334. }
  335. , string: {
  336. _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
  337. , _style: "color: teal;"
  338. }
  339. , number: {
  340. _match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*))(?:%|(?:(?:px|pt|em|)\b))/
  341. , _style: "color: red;"
  342. }
  343. , color : {
  344. _match: /(?:\#[a-fA-F0-9]{3,6})|\b(?:yellow|white|teal|silver|red|purple|olive|navy|maroon|lime|green|gray|fuchsia|blue|black|aqua|YellowGreen|Yellow|WhiteSmoke|White|Wheat|Violet|Turquoise|Tomato|Thistle|Teal|Tan|SteelBlue|SpringGreen|Snow|SlateGrey|SlateGray|SlateBlue|SkyBlue|Silver|Sienna|SeaShell|SeaGreen|SandyBrown|Salmon|SaddleBrown|RoyalBlue|RosyBrown|Red|Purple|PowderBlue|Plum|Pink|Peru|PeachPuff|PapayaWhip|PaleVioletRed|PaleTurquoise|PaleGreen|PaleGoldenRod|Orchid|OrangeRed|Orange|OliveDrab|Olive|OldLace|Navy|NavajoWhite|Moccasin|MistyRose|MintCream|MidnightBlue|MediumVioletRed|MediumTurquoise|MediumSpringGreen|MediumSlateBlue|MediumSeaGreen|MediumPurple|MediumOrchid|MediumBlue|MediumAquaMarine|Maroon|Magenta|Linen|LimeGreen|Lime|LightYellow|LightSteelBlue|LightSlateGrey|LightSlateGray|LightSkyBlue|LightSeaGreen|LightSalmon|LightPink|LightGrey|LightGreen|LightGray|LightGoldenRodYellow|LightCyan|LightCoral|LightBlue|LemonChiffon|LawnGreen|LavenderBlush|Lavender|Khaki|Ivory|Indigo|IndianRed|HotPink|HoneyDew|Grey|GreenYellow|Green|Gray|GoldenRod|Gold|GhostWhite|Gainsboro|Fuchsia|ForestGreen|FloralWhite|FireBrick|DodgerBlue|DimGrey|DimGray|DeepSkyBlue|DeepPink|Darkorange|DarkViolet|DarkTurquoise|DarkSlateGrey|DarkSlateGray|DarkSlateBlue|DarkSeaGreen|DarkSalmon|DarkRed|DarkOrchid|DarkOliveGreen|DarkMagenta|DarkKhaki|DarkGrey|DarkGreen|DarkGray|DarkGoldenRod|DarkCyan|DarkBlue|Cyan|Crimson|Cornsilk|CornflowerBlue|Coral|Chocolate|Chartreuse|CadetBlue|BurlyWood|Brown|BlueViolet|Blue|BlanchedAlmond|Black|Bisque|Beige|Azure|Aquamarine|Aqua|AntiqueWhite|AliceBlue)\b/
  345. , _style: "color: green;"
  346. }
  347. }
  348. };