diff --git a/CHANGELOG.md b/CHANGELOG.md index 7554a7f..89e85ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## 3.4.2 (5. April 2024) + ++ [#87](https://github.com/nadar/quill-delta-parser/issues/87) Fixed a bug where a line break preceding a list containing inline attributes results in improper HTML formatting for next paragraphs. + ## 3.4.1 (13. March 2024) + [#84](https://github.com/nadar/quill-delta-parser/issues/84) Allow align `left` as possible value. diff --git a/src/listener/Text.php b/src/listener/Text.php index 5d7e876..e8595bc 100644 --- a/src/listener/Text.php +++ b/src/listener/Text.php @@ -86,7 +86,7 @@ public function render(Lexer $lexer) // If this element is empty we should maybe directly close and reopen this paragraph as it could be an empty line with // a next elmenet - } elseif ($pick->line->isEmpty() && $next) { + } elseif ($pick->line->isEmpty() && $next && !$next->isDone()) { $isOpen = $this->output($output, self::CLOSEP.self::OPENP, true); // if its open, and it had an end newline, lets close diff --git a/tests/Issue87Test.php b/tests/Issue87Test.php new file mode 100644 index 0000000..77a4283 --- /dev/null +++ b/tests/Issue87Test.php @@ -0,0 +1,48 @@ +This is begin text:


Another text after list

+EOT; +} \ No newline at end of file