Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.509 diff -u -r1.509 comment.module --- modules/comment/comment.module 8 Dec 2006 16:16:30 -0000 1.509 +++ modules/comment/comment.module 8 Dec 2006 19:46:45 -0000 @@ -924,12 +924,15 @@ if ($comment->depth > $last_depth) { $divs++; $output .= '
'; + $last_depth++; } - else if ($comment->depth < $last_depth) { - $divs--; - $output .= '
'; + else { + while ($comment->depth < $last_depth) { + $divs--; + $output .= ''; + $last_depth--; + } } - $last_depth = $comment->depth; if ($mode == COMMENT_MODE_FLAT_COLLAPSED) { $output .= theme('comment_flat_collapsed', $comment);