Continued working on typography class and docs
diff --git a/system/application/config/config.php b/system/application/config/config.php
index 71ebd30..7dc6151 100644
--- a/system/application/config/config.php
+++ b/system/application/config/config.php
@@ -11,7 +11,7 @@
 |	http://example.com/

 |

 */

-$config['base_url']	= "";

+$config['base_url']	= "http://127.0.0.1/EllisLab/_Development/CodeIgniter/";

 

 /*

 |--------------------------------------------------------------------------

diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index 2c5c588..11acea1 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -38,26 +38,11 @@
 {

 	function nl2br_except_pre($str)

 	{

-		$ex = explode("pre>",$str);

-		$ct = count($ex);

+		$CI =& get_instance();

 	

-		$newstr = "";

-		for ($i = 0; $i < $ct; $i++)

-		{

-			if (($i % 2) == 0)

-			{

-				$newstr .= nl2br($ex[$i]);

-			}

-			else

-			{

-				$newstr .= $ex[$i];

-			}

+		$CI->load->library('typography');

 		

-			if ($ct - 1 != $i)

-				$newstr .= "pre>";

-		}

-	

-		return $newstr;

+		return $CI->typography->nl2br_except_pre($str);

 	}

 }

 	

diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index b058fda..dd5f928 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -286,6 +286,40 @@
 	{
 		$this->reduce_empty_lines = ($val === FALSE) ? FALSE : TRUE;
 	}
+
+	// ------------------------------------------------------------------------
+	
+	/**
+	 * Convert newlines to HTML line breaks except within PRE tags
+	 *
+	 * @access	public
+	 * @param	string
+	 * @return	string
+	 */		
+	function nl2br_except_pre($str)
+	{
+		$ex = explode("pre>",$str);
+		$ct = count($ex);
+	
+		$newstr = "";
+		for ($i = 0; $i < $ct; $i++)
+		{
+			if (($i % 2) == 0)
+			{
+				$newstr .= nl2br($ex[$i]);
+			}
+			else
+			{
+				$newstr .= $ex[$i];
+			}
+		
+			if ($ct - 1 != $i)
+				$newstr .= "pre>";
+		}
+	
+		return $newstr;
+	}
+	
 }
 // END Typography Class