1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Text variable isn't very useful inside the loop

This commit is contained in:
Aidan Woods 2019-01-24 22:26:26 +00:00
parent 14b3761687
commit 714ae50211
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -284,8 +284,7 @@ final class Parsedown
$Excerpt->text() !== '';
$Excerpt = $Excerpt->pushingOffsetTo($this->inlineMarkerList)
) {
$text = $Excerpt->text();
$marker = $text[0];
$marker = \substr($Excerpt->text(), 0, 1);
foreach ($this->InlineTypes[$marker] as $inlineType) {
# check to see if the current inline type is nestable in the current context
@ -330,7 +329,6 @@ final class Parsedown
$Inlines[] = Plaintext::build($Excerpt->choppingUpToOffset($startPosition + 1));
$text = \substr($Excerpt->text(), $startPosition + 1);
/** @psalm-suppress LoopInvalidation */
$Excerpt = $Excerpt->choppingFromOffset($startPosition + 1);
}