--- modules/node/node.module.1.908 Sun Nov 25 18:40:25 2007 +++ modules/node/node.module Mon Nov 26 11:23:58 2007 @@ -279,7 +279,7 @@ function node_teaser($body, $format = NU } // If we have a short body, the entire body is the teaser. - if (strlen($body) < $size) { + if (strlen($body) <= $size) { return $body; } @@ -308,8 +308,14 @@ function node_teaser($body, $format = NU // A paragraph near the end of sliced teaser is most preferable. $break_points[] = array('

' => 0); - // Other line breaks often indicate a paragraph. - $break_points[] = array('
' => 6, '
' => 4, "\n" => 1); + // If no complete paragraph then treat line breaks as paragraphs. + $line_breaks = array('
' => 6, '
' => 4); + // Newline only indicates a line break if line break converter filter is + // present. + if (isset($filters['filter/1'])) { + $line_breaks["\n"] = 1; + } + $break_points[] = $line_breaks; // If the first paragraph is too long, split at the end of a sentence. $break_points[] = array('. ' => 1, '! ' => 1, '? ' => 1, '。' => 0, '؟ ' => 1);