Code Duplication    Length = 2-2 lines in 3 locations

Sources/Subs.php 3 locations

@@ 1954-1955 (lines=2) @@
1951
				$pos2 = $pos - 1;
1952
1953
				// See the comment at the end of the big loop - just eating whitespace ;).
1954
				if (!empty($tag['block_level']) && substr($message, $pos, 4) == '<br>')
1955
					$message = substr($message, 0, $pos) . substr($message, $pos + 4);
1956
				if (!empty($tag['trim']) && $tag['trim'] != 'inside' && preg_match('~(<br>|&nbsp;|\s)*~', substr($message, $pos), $matches) != 0)
1957
					$message = substr($message, 0, $pos) . substr($message, $pos + strlen($matches[0]));
1958
			}
@@ 2226-2227 (lines=2) @@
2223
				$pos1 += $ot_strlen + 2;
2224
2225
				// Trim or eat trailing stuff... see comment at the end of the big loop.
2226
				if (!empty($open_tags[$i]['block_level']) && substr($message, $pos, 4) == '<br>')
2227
					$message = substr($message, 0, $pos) . substr($message, $pos + 4);
2228
				if (!empty($open_tags[$i]['trim']) && $tag['trim'] != 'inside' && preg_match('~(<br>|&nbsp;|\s)*~', substr($message, $pos), $matches) != 0)
2229
					$message = substr($message, 0, $pos) . substr($message, $pos + strlen($matches[0]));
2230
@@ 2401-2402 (lines=2) @@
2398
		}
2399
2400
		// If this is block level, eat any breaks after it.
2401
		if (!empty($tag['block_level']) && substr($message, $pos + 1, 4) == '<br>')
2402
			$message = substr($message, 0, $pos + 1) . substr($message, $pos + 5);
2403
2404
		// Are we trimming outside this tag?
2405
		if (!empty($tag['trim']) && $tag['trim'] != 'outside' && preg_match('~(<br>|&nbsp;|\s)*~', substr($message, $pos + 1), $matches) != 0)