From 1aa376d6ec1bcb88fb30301b6e32cb7d7b2ad0f3 Mon Sep 17 00:00:00 2001 From: Michael Ochmann Date: Thu, 18 Aug 2022 17:28:43 +0200 Subject: [PATCH] fixed bug in parser where bold text on single line was parsed as list --- src/Parser.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Parser.php b/src/Parser.php index 208db2e..426254c 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -511,6 +511,10 @@ class Parser { while ($this->current()->type !== TokenType::EOF) { switch($this->current()->type) { case TokenType::ASTERISK: + if ($this->next()->type === TokenType::ASTERISK) { + $this->buildParagraph($this->parseText(true)); + break; + } $list = $this->parseList(); $this->document->appendChild($list); break;