fixed bug where ordered lists and tables were wrongly detected

feature/strict-mode
Michael Ochmann 3 years ago
parent f3bbcb07e7
commit 594b85a81e
  1. 14
      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;

Loading…
Cancel
Save