@@ 417-427 (lines=11) @@ | ||
414 | # Fenced code block marker: find matching end marker. |
|
415 | $fence_indent = strlen($capture[1]); # use captured indent in re |
|
416 | $fence_re = $capture[2]; # use captured fence in re |
|
417 | if (preg_match('{^(?>.*\n)*?[ ]{'.($fence_indent).'}'.$fence_re.'[ ]*(?:\n|$)}', $text, |
|
418 | $matches)) |
|
419 | { |
|
420 | # End marker found: pass text unchanged until marker. |
|
421 | $parsed .= $tag . $matches[0]; |
|
422 | $text = substr($text, strlen($matches[0])); |
|
423 | } |
|
424 | else { |
|
425 | # No end marker: just skip it. |
|
426 | $parsed .= $tag; |
|
427 | } |
|
428 | } |
|
429 | # |
|
430 | # Check for: Indented code block. |
|
@@ 444-454 (lines=11) @@ | ||
441 | else if ($tag{0} == "`") { |
|
442 | # Find corresponding end marker. |
|
443 | $tag_re = preg_quote($tag); |
|
444 | if (preg_match('{^(?>.+?|\n(?!\n))*?(?<!`)'.$tag_re.'(?!`)}', |
|
445 | $text, $matches)) |
|
446 | { |
|
447 | # End marker found: pass text unchanged until marker. |
|
448 | $parsed .= $tag . $matches[0]; |
|
449 | $text = substr($text, strlen($matches[0])); |
|
450 | } |
|
451 | else { |
|
452 | # Unmatched marker: just skip it. |
|
453 | $parsed .= $tag; |
|
454 | } |
|
455 | } |
|
456 | # |
|
457 | # Check for: Opening Block level tag or |