Kompi traveler adalah situs referensi SEO di Indonesia yang berisi tutorial SEO, blogging, growth hacking dan digital marketing, tutorial html, php, javascript, dan lain lain.
// Make the bold assumption that an // all uppercase word has a special meaning '/(?<!\w|>|\#)( [A-Z_0-9]{2,} )(?!\w)/x' => '<span class="D">$1</span>',
// Paste the comments and strings back in again $s = str_replace(array_keys($tokens), array_values($tokens), $s);
// Delete the "Escaped Backslash Workaround Token" (TM) // and replace tabs with four spaces. $s = str_replace(array('<e>', "\t"), array('', ' '), $s);
return '<pre><code>' . $s . '</code></pre>'; }
// Regexp-Callback to replace every comment or string with a uniqid and save // the matched text in an array // This way, strings and comments will be stripped out and wont be processed // by the other expressions searching for keywords etc. private static function replaceId(&$a, $match) { $id = "##r" . uniqid() . "##";
0 Response to "Syntax Highlighter Generik dengan PHP"
Post a Comment