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

File diff suppressed because one or more lines are too long

View File

@@ -583,7 +583,7 @@
parseBlockTable(block, key, line, state, lines) {
var align, aligns, head, j, len, matches, row, rows;
if (!!(matches = line.match(/^((?:(?:(?:\||\+)(?:[ :]*\-+[ :]*)(?:\||\+))|(?:(?:[ :]*\-+[ :]*)(?:\||\+)(?:[ :]*\-+[ :]*))|(?:(?:[ :]*\-+[ :]*)(?:\||\+))|(?:(?:\||\+)(?:[ :]*\-+[ :]*)))+)$/))) {
if (!!(matches = line.match(/^\s*(\|?[ :]*-+[ :]*(?:\|[ :]*-+[ :]*)*\|?)\s*$/))) {
if (this.isBlock('table')) {
block[3][0].push(block[3][2]);
block[3][2] += 1;

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] ++;