Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow <embed> elements to be converted properly, fix blockquote format #25

Merged
merged 9 commits into from
Jul 25, 2024

Conversation

srtfisher
Copy link
Member

@srtfisher srtfisher commented Jul 25, 2024

Fixes #24. Fixes #23

Will convert a string such as:

<embed type="video/webm" src="/media/mr-arnold.mp4" width="250" height="200" />

to a block:

<!-- wp:html --><embed type="video/webm" src="/media/mr-arnold.mp4" width="250" height="200"></embed><!-- /wp:html -->

Relates to #14. Also using this as a PR to upgrade the package's dependencies and align the actions to the organization's standards. The tests are now powered by a data provider.

@srtfisher
Copy link
Member Author

Need to investigate why I had to modify the fake_request() call (upstream bug in the testing framework).

@srtfisher srtfisher marked this pull request as draft July 25, 2024 21:11
@srtfisher srtfisher changed the title Allow <embed> elements to be converted properly Allow <embed> elements to be converted properly, fix blockquote format Jul 25, 2024
@srtfisher srtfisher marked this pull request as ready for review July 25, 2024 21:29
Copy link

@scottnelle scottnelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👻

public function convert_with_children( DOMNode $node ): string {
$children = '';

// Recursively convert the children of the blockquote to blocks.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blockquotes only, or might this be used for other blocks as well?

@srtfisher srtfisher enabled auto-merge July 25, 2024 21:55
@srtfisher srtfisher merged commit dbea4ac into develop Jul 25, 2024
5 checks passed
@srtfisher srtfisher deleted the hotfix/24-embed branch July 25, 2024 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fatal Error when encountering <embed> elements Blockquote
2 participants