diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
index fc982cc..acba69e 100644
--- src/wp-includes/formatting.php
+++ src/wp-includes/formatting.php
@@ -1609,9 +1609,9 @@ function make_clickable( $text ) {
 	$nested_code_pre = 0; // Keep track of how many levels link is nested inside <pre> or <code>
 	foreach ( $textarr as $piece ) {
 
-		if ( preg_match( '|^<code[\s>]|', $piece ) || preg_match( '|^<pre[\s>]|', $piece ) )
+		if ( preg_match( '|^<code[\s>]|i', $piece ) || preg_match( '|^<pre[\s>]|i', $piece ) )
 			$nested_code_pre++;
-		elseif ( ( '</code>' === $piece || '</pre>' === $piece ) && $nested_code_pre )
+		elseif ( ( '</code>' === strtolower($piece) || '</pre>' === strtolower($piece) ) && $nested_code_pre )
 			$nested_code_pre--;
 
 		if ( $nested_code_pre || empty( $piece ) || ( $piece[0] === '<' && ! preg_match( '|^<\s*[\w]{1,20}+://|', $piece ) ) ) {
diff --git tests/phpunit/tests/formatting/MakeClickable.php tests/phpunit/tests/formatting/MakeClickable.php
index 221635d..f6ae895 100644
--- tests/phpunit/tests/formatting/MakeClickable.php
+++ tests/phpunit/tests/formatting/MakeClickable.php
@@ -301,7 +301,7 @@ class Tests_Formatting_MakeClickable extends WP_UnitTestCase {
 			'<codecustomtag>http://wordpress.org</codecustomtag>',
 			'URL before pre http://wordpress.org<pre>http://wordpress.org</pre>',
 			'URL before code http://wordpress.org<code>http://wordpress.org</code>',
-			'URL after pre <pre>http://wordpress.org</pre>http://wordpress.org',
+			'URL after pre <PRE>http://wordpress.org</PRE>http://wordpress.org',
 			'URL after code <code>http://wordpress.org</code>http://wordpress.org',
 			'URL before and after pre http://wordpress.org<pre>http://wordpress.org</pre>http://wordpress.org',
 			'URL before and after code http://wordpress.org<code>http://wordpress.org</code>http://wordpress.org',
@@ -317,7 +317,7 @@ class Tests_Formatting_MakeClickable extends WP_UnitTestCase {
 			'<codecustomtag><a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a></codecustomtag>',
 			'URL before pre <a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a><pre>http://wordpress.org</pre>',
 			'URL before code <a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a><code>http://wordpress.org</code>',
-			'URL after pre <pre>http://wordpress.org</pre><a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a>',
+			'URL after pre <PRE>http://wordpress.org</PRE><a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a>',
 			'URL after code <code>http://wordpress.org</code><a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a>',
 			'URL before and after pre <a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a><pre>http://wordpress.org</pre><a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a>',
 			'URL before and after code <a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a><code>http://wordpress.org</code><a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a>',
