In theory PHP stores the length of strings, so looking this up should be quick

This commit is contained in:
Aidan Woods 2018-04-09 01:46:36 +01:00
parent b53aa74a72
commit e74a5bd7ed
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -1102,7 +1102,7 @@ class Parsedown
{ {
$marker = $excerpt[0]; $marker = $excerpt[0];
$markerPosition = strpos($text, $marker); $markerPosition = strlen($text) - strlen($excerpt);
$Excerpt = array('text' => $excerpt, 'context' => $text); $Excerpt = array('text' => $excerpt, 'context' => $text);