-
Notifications
You must be signed in to change notification settings - Fork 9
Fix wp-text directive in SSR
#188
Conversation
|
Tests are failing, so it's probably not the correct solution 😄 Taking a look at it. |
That seems like the correct approach 🤔 I'll take a deeper look in a bit! |
|
I believe the one breaking the tests is the other commit:
|
| ); | ||
|
|
||
| $tags = new WP_HTML_Tag_Processor( $block_content ); | ||
| $tags = new WP_Directive_Processor( $block_content ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this!
(wp-directives.php is the one file that doesn't have unit test coverage, as it's kind of instantiating everything, so it'd be more of a case for integration testing.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem at all 🙂 We will need integration testing at some point that should handle this.
This reverts commit ac35c9c.
|
Tests are passing now 🙂 Do you believe it is ready to be merged @ockham ? Or is there anything missing? |
ockham
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you, Mario! ![]()
I was testing the recently added
wp-textdirective in SSR, and it doesn't seem to work in my case. I'm facing two different issues:Uncaught Error: Call to undefined method WP_HTML_Tag_Processor::set_inner_html().In order to solve that, I made a couple of commits, but I am not sure if it is the best way to solve it:
process_directives_in_blockfunction, I used theWP_Directive_Processorclass instead ofWP_HTML_Tag_Processor, because is the one containing theset_inner_htmlfunction.set_inner_htmlfunction to move one character to the left.Please, let me know if this is correct and feel free to make any changes needed 🙂