From c95c7e9c10efea460b8c4ce03e3be241817625d3 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Wed, 22 Oct 2008 20:17:21 +0000 Subject: Fixed a nexted
  • bug --- system/libraries/Typography.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'system/libraries/Typography.php') diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index 2393e164e..0ee6a24d0 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -290,7 +290,10 @@ class CI_Typography { $str = preg_replace("/([^\n])(\n)([^\n])/", "\\1
    \\2\\3", $str); // Wrap the whole enchilada in enclosing paragraphs - $str = '

    '.$str.'

    '; + if ($str != "\n") + { + $str = '

    '.$str.'

    '; + } // Remove empty paragraphs if they are on the first line, as this // is a potential unintended consequence of the previous code -- cgit v1.2.3-24-g4f1b