/*	This work is licensed under Creative Commons GNU LGPL License.
	License: http://creativecommons.org/licenses/LGPL/2.1/
	Author:  Stefan Goessner/2005-06
	Web:     http://goessner.net/
   credits: http://www.regular-expressions.info/examplesprogrammer.html
*/
Wiky.rules.lang.js = [
      "Wiky.rules.code",
      { rex:/"([^"\\\xB6]*(\\.[^"\\\xB6]*)*)"/g, tmplt:function($0,$1){return Wiky.store("\""+$1+"\"");}}, // string delimited by '"' with '\"' allowed ..
      { rex:/'([^'\\\xB6]*(\\.[^'\\\xB6]*)*)'/g, tmplt:function($0,$1){return Wiky.store("\'"+$1+"\'");}}, // string delimited by "'" with "\'" allowed ..
      { rex:/\/\/(.*?)(?:\xB6|$)/g, tmplt:function($0,$1){return Wiky.store("//"+$1+"\xB6");}}, // single line comment
      { rex:/\/\*(.*?)\*\//g, tmplt:function($0,$1){return Wiky.store("\/*"+$1+"*\/");}}, // multi-line comment
//       { rex:/([\]\[\-+\|*!%<>=\{\}?:,\)\(]+)|("|/|=)+/g, tmplt:"$1"}, // operators
      { rex:/\b(break|case|catch|continue|do|else|false|for|function|if|in|new|return|switch|this|throw|true|try|var|while|with)\b/g, tmplt:"$1" }, // keywords
      { rex:/\b(arguments|Array|Boolean|Date|Error|Function|Global|Math|Number|Object|RegExp|String)\b/g, tmplt:"$1" }, // objects
      { rex:/\.(abs|acos|anchor|arguments|asin|atan|atan2|big|blink|bold|callee|caller|ceil|charAt|charCodeAt|concat|constructor|cos|E|escape|eval|exp|fixed|floor|fontcolor|fontsize|fromCharCode|getDate|getDay|getFullYear|getHours|getMilliseconds|getMinutes|getMonth|getSeconds|getTime|getTimezoneOffset|getUTCDate|getUTCDay|getUTCFullYear|getUTCHours|getUTCMilliseconds|getUTCMinutes|getUTCMonth|getUTCSeconds|getVarDate|getYear|index|indexOf|Infinity|input|isFinite|isNaN|italics|join|lastIndex|lastIndexOf|lastMatch|lastParen|leftContext|length|link|LN10|LN2|log|LOG10E|LOG2E|match|max|MAX_VALUE|min|MIN_VALUE|NaN|NaN|NEGATIVE_INFINITY|parse|parseFloat|parseInt|PI|pop|POSITIVE_INFINITY|pow|prototype|push|random|replace|reverse|rightContext|round|search|setDate|setFullYear|setHours|setMilliseconds|setMinutes|setMonth|setSeconds|setTime|setUTCDate|setUTCFullYear|setUTCHours|setUTCMilliseconds|setUTCMinutes|setUTCMonth|setUTCSeconds|setYear|shift|sin|slice|slice|small|sort|splice|split|sqrt|SQRT1_2|SQRT2|strike|sub|substr|substring|sup|tan|toGMTString|toLocaleString|toLowerCase|toString|toUpperCase|toUTCString|unescape|unshift|UTC|valueOf)\b/g, tmplt:".$1" }, // members
];
Wiky.rules.lang.xml = [
      { rex:/";} }, // script blocks ..
      { rex://g, tmplt:function($0,$1){return Wiky.store("<![CDATA["+$1+"]]>");} }, // CDATA sections, ..
      { rex://g, tmplt:function($0,$1){return Wiky.store("<!"+$1+">");} }, // inline xml comments, doctypes, ..
      { rex://g, tmplt:"\xBB"}, // replace '>' by '»'
      { rex:/([-A-Za-z0-9_:]+)[ ]*=[ ]*\"(.*?)\"/g, tmplt:"$1="$2""}, // "xml attribute value strings ..
      { rex:/(\xAB[\/]?)([-A-Za-z0-9_:]+)/g, tmplt:"$1$2"}, // "xml tag ..
      { rex:/\xAB/g, tmplt:"<"}, // replace '«' by '<'
      { rex:/\xBB/g, tmplt:">"}, // replace '»' by '>'
];
Wiky.inverse.lang.js = [
     { rex:/|<\/span>/mgi, tmplt:"" },
     { rex:/(.*?)<\/strong>/mgi, tmplt:"[*$1*]" },
      "Wiky.inverse.code"
];
Wiky.inverse.lang.xml = [
     { rex:/|<\/span>/mgi, tmplt:"" },
     "Wiky.inverse.lang.js"
];