Skip to content

Commit 32f3186

Browse files
Fixes an esoteric bug where spaces were sometimes inserted in Markdown
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
1 parent 7a78137 commit 32f3186

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/Parsers/MarkdownParser.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3020,7 +3020,9 @@ protected function extractLinkTitle(string $title = ''): string
30203020
*/
30213021
protected function amalgamateStrings(array &$content): void
30223022
{
3023-
for ($i = 0; $i < count($content); $i++) {
3023+
$content = array_values($content);
3024+
3025+
for ($i = 0; $i <= array_key_last($content); $i++) {
30243026
if (!isset($content[$i]) || !is_string($content[$i])) {
30253027
continue;
30263028
}

0 commit comments

Comments
 (0)