diff --git a/index.php b/index.php index 20b827a..37f6c43 100644 --- a/index.php +++ b/index.php @@ -1,11 +1,5 @@ + // if (\preg_match('/^<\/[a-z][a-z\d-]*\s*>/i', $chop, $m)) { $content = \substr($content, \strlen($m[0])); $chops[] = [$m[0], 0]; continue; } - // + // if (\preg_match('/^<[a-z][a-z\d-]*(?>\s+[a-z:_][\w.:-]*(?>\s*=\s*(?>"[^"]*"|\'[^\']*\'|[^\s"\'<=>`]+)?)?)*\s*\/?>/i', $chop, $m)) { $content = \substr($content, \strlen($m[0])); $chops[] = [$m[0], 0]; @@ -524,6 +518,13 @@ function split(string $content) { } // Start of a tight list block if (_list($row)) { + if (_list_b($row) && 1 === \strspn($row, '0123456789')) { + // + if ('1' !== $row[0]) { + $blocks[$block][0] .= "\n" . $prefix . $row; + continue; + } + } $blocks[++$block] = [$prefix . $row, 2]; continue; }