This commit is contained in:
joyqi
2025-06-27 11:12:45 +08:00
committed by GitHub
parent d9d0be334d
commit 23cdc89441
3 changed files with 3 additions and 3 deletions

View File

@@ -1036,7 +1036,7 @@ class HyperDown
*/
private function parseBlockTable(?array $block, int $key, string $line, ?array &$state, array $lines): bool
{
if (preg_match("/^((?:(?:(?:\||\+)(?:[ :]*\-+[ :]*)(?:\||\+))|(?:(?:[ :]*\-+[ :]*)(?:\||\+)(?:[ :]*\-+[ :]*))|(?:(?:[ :]*\-+[ :]*)(?:\||\+))|(?:(?:\||\+)(?:[ :]*\-+[ :]*)))+)$/", $line, $matches)) {
if (preg_match("/^\s*(\|?[ :]*-+[ :]*(?:\|[ :]*-+[ :]*)*\|?)\s*$/", $line, $matches)) {
if ($this->isBlock('table')) {
$block[3][0][] = $block[3][2];
$block[3][2] ++;