Code Duplication    Length = 4-9 lines in 2 locations

system/vendor/Markdown.php 2 locations

@@ 1198-1206 (lines=9) @@
1195
			$token =& $parts[1];
1196
			$text =& $parts[2];
1197
			
1198
			if (empty($token)) {
1199
				# Reached end of text span: empty stack without emitting.
1200
				# any more emphasis.
1201
				while ($token_stack[0]) {
1202
					$text_stack[1] .= array_shift($token_stack);
1203
					$text_stack[0] .= array_shift($text_stack);
1204
				}
1205
				break;
1206
			}
1207
			
1208
			$token_len = strlen($token);
1209
			if ($tree_char_em) {
@@ 1257-1260 (lines=4) @@
1254
			} else if ($token_len == 2) {
1255
				if ($strong) {
1256
					# Unwind any dangling emphasis marker:
1257
					if (strlen($token_stack[0]) == 1) {
1258
						$text_stack[1] .= array_shift($token_stack);
1259
						$text_stack[0] .= array_shift($text_stack);
1260
					}
1261
					# Closing strong marker:
1262
					array_shift($token_stack);
1263
					$span = array_shift($text_stack);