diff --git a/src/Parser.php b/src/Parser.php index 6655ef7..280ca37 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -657,9 +657,11 @@ class Parser { $this->parseHeading(); break; case TokenType::NUMBER: - $list = $this->parseList(ListType::ORDERED); - $this->document->appendChild($list); - break; + if ($this->next()->type === TokenType::DOT) { + $list = $this->parseList(ListType::ORDERED); + $this->document->appendChild($list); + break; + } case TokenType::BACKTICK: $this->parseCodeBlock(); break; @@ -670,8 +672,10 @@ class Parser { $this->parseReference(); break; case TokenType::PIPE: - $this->parseTable(); - break; + if ($this->next()->type === TokenType::COLON || $this->next()->type === TokenType::MINUS) { + $this->parseTable(); + break; + } case TokenType::GT: $this->parseBlockQuote(); break;