0
0
2
| 1 | class SyntaxHighlight { |
| 2 | |
| 3 | static $tokens = array();// This array will be filled from the regexp-callback |
| 4 | public static function process($s) { |
| 5 | $s = htmlspecialchars($s); |
| 6 | // Workaround for escaped backslashes |
| 7 | $s = str_replace('\\\\','\\\\<e>', $s); |
| 8 | $regexp = array( |
| 9 | // Punctuations |
| 10 | '/([\-\!\%\^\*\(\)\+\|\~\=\`\{\}\[\]\:\"\'<>\?\,\.\/]+)/' |