/*
===============================================================================
Chili is the jQuery code highlighter plugin
...............................................................................
Copyright 2007 / Andrea Ercolino
-------------------------------------------------------------------------------
LICENSE: http://www.opensource.org/licenses/mit-license.php
WEBSITE: http://noteslog.com/chili/
===============================================================================
*/
/*
this file shows how to configure a static setup
it must be linked from the head of a page like:
*/
ChiliBook.recipeLoading = false;
ChiliBook.recipes[ "jquery.js" ] =
{
steps:
{
mlcom : { exp: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// }
, com : { exp: /\/\/.*/ }
, regexp : { exp: /\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/ }
, string : { exp: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ }
, numbers : { exp: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/ }
, keywords: { exp: /\b(arguments|break|case|catch|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|try|typeof|var|void|while|with)\b/ }
, global : { exp: /\b(toString|valueOf|window|element|prototype|constructor|document|escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|NaN|isNaN|Infinity)\b/ }
, "jquery utilities" : {
exp : /(?:\$\.browser|\$\.each|\$\.extend|\$\.grep|\$\.map|\$\.merge|\$\.trim)\b/
, replacement: '$$'
}
,"jquery private" : {
exp : /(?:\$\.find|\$\.parents|\$\.sibling|\.domManip|\.eventTesting|\.extend|\.get|\.init|\.jquery|\.pushStack)\b/
, replacement: '$$'
}
,"jquery ajax" : {
exp : /(?:\$\.ajax|\$\.ajaxSetup|\$\.ajaxTimeout|\$\.get|\$\.getIfModified|\$\.getJSON|\$\.getScript|\$\.post|.ajaxComplete|.ajaxError|.ajaxSend|.ajaxStart|.ajaxStop|.ajaxSuccess|.load|.loadIfModified|.serialize)\b/
, replacement: '$$'
}
, "jquery object" : {
exp : /jQuery|\$(?=\W)/
, replacement: '$$'
}
,"jquery core" : {
exp : /\$\.extend|\$\.noConflict|\.(?:each|eq|get|gt|index|lt|size)\b/
, replacement: '$$'
}
,"jquery css" : {
exp : /\.(?:css|height|width)\b/
, replacement: '$$'
}
,"jquery attributes" : {
exp : /\.(?:addClass|attr|html|removeAttr|removeClass|text|toggleClass|val)\b/
, replacement: '$$'
}
,"jquery traversing" : {
exp : /\.(?:add|children|contains|end|filter|find|is|next|not|parent|parents|prev|siblings)\b/
, replacement: '$$'
}
,"jquery manipulation": {
exp : /\.(?:after|append|appendTo|before|clone|empty|insertAfter|insertBefore|prepend|prependTo|remove|wrap)\b/
, replacement: '$$'
}
,"jquery effects" : {
exp : /\.(?:animate|fadeIn|fadeOut|fadeTo|hide|show|slideDown|slideToggle|slideUp|toggle)\b/
, replacement: '$$'
}
,"jquery events" : {
exp : /\.(?:bind|blur|change|click|dblclick|error|focus|hover|keydown|keypress|keyup|load|mousedown|mousemove|mouseout|mouseover|mouseup|one|ready|resize|scroll|select|submit|toggle|trigger|unbind|unload)\b/
, replacement: '$$'
}
}
};
ChiliBook.recipes[ "html.js" ] =
{
steps: {
mlcom : { exp: /\