-
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.
* Separate paste handler * Add test for WP raw HTML conversion * Add docs
- Loading branch information
Showing
10 changed files
with
174 additions
and
74 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
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
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
35 changes: 35 additions & 0 deletions
35
test/integration/__snapshots__/blocks-raw-handling.spec.js.snap
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Blocks raw handling rawHandler should convert HTML post to blocks with minimal content changes 1`] = ` | ||
"<!-- wp:heading --> | ||
<h2>Howdy</h2> | ||
<!-- /wp:heading --> | ||
<!-- wp:image --> | ||
<figure class=\\"wp-block-image\\"><img src=\\"https://w.org\\" alt=\\"\\"/></figure> | ||
<!-- /wp:image --> | ||
<!-- wp:paragraph --> | ||
<p>This is a paragraph.</p> | ||
<!-- /wp:paragraph --> | ||
<!-- wp:paragraph --> | ||
<p>Preserve <span style=\\"color:red\\">me</span>!</p> | ||
<!-- /wp:paragraph --> | ||
<!-- wp:heading {\\"level\\":3} --> | ||
<h3>More tag</h3> | ||
<!-- /wp:heading --> | ||
<!-- wp:more --> | ||
<!--more--> | ||
<!-- /wp:more --> | ||
<!-- wp:heading {\\"level\\":3} --> | ||
<h3>Shortcode</h3> | ||
<!-- /wp:heading --> | ||
<!-- wp:gallery {\\"columns\\":3,\\"linkTo\\":\\"attachment\\"} --> | ||
<ul class=\\"wp-block-gallery columns-3 is-cropped\\"><li class=\\"blocks-gallery-item\\"><figure><img data-id=\\"1\\" class=\\"wp-image-1\\"/></figure></li></ul> | ||
<!-- /wp:gallery -->" | ||
`; |
Oops, something went wrong.