Fix: Last line of code block was wrong
This commit is contained in:
parent
8fb6672ef9
commit
772af16752
|
@ -187,6 +187,10 @@ private function formatCodeBlock(string $block): string
|
||||||
$lines[0] = preg_replace('/^(```\w*)\s*{.*?}$/', '$1', trim($lines[0]));
|
$lines[0] = preg_replace('/^(```\w*)\s*{.*?}$/', '$1', trim($lines[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$last = count($lines) - 1;
|
||||||
|
|
||||||
|
$lines[$last] = '```';
|
||||||
|
|
||||||
// Reassemble the block
|
// Reassemble the block
|
||||||
return implode("\n", $lines);
|
return implode("\n", $lines);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user