--- codefilter.module	2008-01-14 15:30:46.000000000 +0530
+++ codefilter.module	2009-10-06 21:31:35.000000000 +0530
@@ -73,8 +73,8 @@ function codefilter_process_code($text) 
 
   $text = '<code>'. codefilter_fix_spaces(str_replace(' ', '&nbsp;', $text)) .'</code>';
   if ($multiline) $text = '<div class="codeblock">'. $text .'</div>';
-  // Remove newlines to avoid clashing with the linebreak filter
-  return str_replace("\n", '', $text);
+  // Convert newlines so that linebreak filter won't convert them to <p> tags
+  return str_replace("\n", '&#10;', $text);
 }
 
 function codefilter_fix_spaces($text) {
