-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parser (Fix): Output freeform content before void blocks (#9984)
* Parser (Fix): Output freeform content before void blocks Resolves #9968 It was noted that a classic block preceding a void block would disappear in the editor while if that same classic block preceded the long-form non-void representation of an empty block then things would load as expected. This behavior was determined to originate in the new default parser in #8083 and the bug was that with void blocks we weren't sending any preceding HTML soup/freeform content into the output list. In this patch I've duplicated some code from the block-closing function of the parser to spit out this content when a void block is at the top-level of the document. This bug did not appear when void blocks are nested because it's the parent block that eats HTML soup. In the case of the top-level void however we were immediately pushing that void block to the output list and neglecting the freeform HTML. I've added a few tests to verify and demonstrate this behavior. Actually, since I wasn't sure what was wrong I wrote the tests first to try and understand the behaviors and bugs. There are a few tests that are thus not entirely essential but worthwhile to have in here.
- Loading branch information
Showing
4 changed files
with
74 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
## 1.0.1 (unreleased) | ||
- Fix: Include freeform content preceding void blocks (#9984) | ||
|
||
## 1.0.0 | ||
|
||
- Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this same file I'm seeing conflicting shapes for
attrs
: