Quote:Very good what did you doOh i jsut saw this.
I replace PHP's nl2br function with a modified function to replace pre tags with the pytohn brush (since that is what we are using to insert codeboxes).
in class_parser.php ->
function my2_nl2br($string){ $string = str_replace("\n", "<br />", $string); if(preg_match_all('/\<pre class="brush: python"\>(.*?)\<\/pre\>/', $string, $match)){ foreach($match as $a){ foreach($a as $b){ $string = str_replace('<pre class="brush: python">'.$b.'</pre>','<pre class="brush: python">'.str_replace("<br />", "\n", $b)."</pre>", $string); } } } return $string; }and used that in the post bit instead
Recommended Tutorials: