From 60821d6e069cbf2ab859c883f25f56c9c244aa94 Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Sun, 7 Jun 2026 17:06:49 -0400 Subject: [PATCH 1/4] vendor: refresh html-to-blocks-converter --- composer.json | 2 +- composer.lock | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 4c1e881..e972939 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,8 @@ ] }, "require": { - "chubes4/html-to-blocks-converter": "dev-main", "php": "^8.1", + "chubes4/html-to-blocks-converter": "dev-fix-static-form-surrogate-parity", "league/commonmark": "^2.5", "league/html-to-markdown": "^5.1" }, diff --git a/composer.lock b/composer.lock index 4f78e7c..7025232 100644 --- a/composer.lock +++ b/composer.lock @@ -4,26 +4,25 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fa21093e6f55653057bedf2e6a1e1b99", + "content-hash": "343928b2f3a9da77df759b7787d44dfb", "packages": [ { "name": "chubes4/html-to-blocks-converter", - "version": "dev-main", + "version": "dev-fix-static-form-surrogate-parity", "source": { "type": "git", "url": "https://github.com/chubes4/html-to-blocks-converter", - "reference": "94977024d4b676c723232d0a7c3b01c8563c224a" + "reference": "6a2f53060402ef97f7e26cc826e392a682b4c3f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chubes4/html-to-blocks-converter/zipball/94977024d4b676c723232d0a7c3b01c8563c224a", - "reference": "94977024d4b676c723232d0a7c3b01c8563c224a", + "url": "https://api.github.com/repos/chubes4/html-to-blocks-converter/zipball/6a2f53060402ef97f7e26cc826e392a682b4c3f7", + "reference": "6a2f53060402ef97f7e26cc826e392a682b4c3f7", "shasum": "" }, "require": { "php": ">=7.4" }, - "default-branch": true, "type": "wordpress-plugin", "autoload": { "files": [ @@ -41,7 +40,7 @@ ], "description": "Convert raw HTML into Gutenberg block arrays using WordPress' HTML API.", "homepage": "https://github.com/chubes4/html-to-blocks-converter", - "time": "2026-06-07T20:27:36+00:00" + "time": "2026-06-07T21:04:36+00:00" }, { "name": "dflydev/dot-access-data", From 4be38cd0bba17773f6c80f2b02e779896c14436a Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Sun, 7 Jun 2026 17:18:15 -0400 Subject: [PATCH 2/4] fix: prefer root html block converter --- includes/api.php | 8 ++++---- includes/class-bfb-html-adapter.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/api.php b/includes/api.php index f80f2cd..b24b928 100644 --- a/includes/api.php +++ b/includes/api.php @@ -191,10 +191,10 @@ function bfb_convert_fragment( string $html, array $options = array() ): array { */ function bfb_h2bc_capabilities(): array { $handler = null; - if ( function_exists( '\BlockFormatBridge\Vendor\html_to_blocks_raw_handler' ) ) { - $handler = '\BlockFormatBridge\Vendor\html_to_blocks_raw_handler'; - } elseif ( function_exists( 'html_to_blocks_raw_handler' ) ) { + if ( function_exists( 'html_to_blocks_raw_handler' ) ) { $handler = 'html_to_blocks_raw_handler'; + } elseif ( function_exists( '\BlockFormatBridge\Vendor\html_to_blocks_raw_handler' ) ) { + $handler = '\BlockFormatBridge\Vendor\html_to_blocks_raw_handler'; } $path = null; @@ -253,8 +253,8 @@ function bfb_h2bc_capabilities(): array { */ function bfb_h2bc_capability_function(): ?string { $candidates = array( - '\BlockFormatBridge\Vendor\html_to_blocks_capabilities', 'html_to_blocks_capabilities', + '\BlockFormatBridge\Vendor\html_to_blocks_capabilities', ); $defined = get_defined_functions(); $functions = array_map( 'strtolower', $defined['user'] ); diff --git a/includes/class-bfb-html-adapter.php b/includes/class-bfb-html-adapter.php index 551993e..45d665f 100644 --- a/includes/class-bfb-html-adapter.php +++ b/includes/class-bfb-html-adapter.php @@ -65,13 +65,13 @@ public function to_blocks( string $content, array $options = array() ): array { return bfb_filter_html_to_blocks_result( $pre_result, $content, $options, $args ); } - if ( function_exists( '\BlockFormatBridge\Vendor\html_to_blocks_raw_handler' ) ) { - $blocks = \BlockFormatBridge\Vendor\html_to_blocks_raw_handler( $args ); + if ( function_exists( 'html_to_blocks_raw_handler' ) ) { + $blocks = html_to_blocks_raw_handler( $args ); return bfb_filter_html_to_blocks_result( is_array( $blocks ) ? $blocks : array(), $content, $options, $args ); } - if ( function_exists( 'html_to_blocks_raw_handler' ) ) { - $blocks = html_to_blocks_raw_handler( $args ); + if ( function_exists( '\BlockFormatBridge\Vendor\html_to_blocks_raw_handler' ) ) { + $blocks = \BlockFormatBridge\Vendor\html_to_blocks_raw_handler( $args ); return bfb_filter_html_to_blocks_result( is_array( $blocks ) ? $blocks : array(), $content, $options, $args ); } From bd96361850b297a7226b5bcf41abaebf3e76cded Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Sun, 7 Jun 2026 17:24:44 -0400 Subject: [PATCH 3/4] vendor: refresh html-to-blocks-converter --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 7025232..53957af 100644 --- a/composer.lock +++ b/composer.lock @@ -12,12 +12,12 @@ "source": { "type": "git", "url": "https://github.com/chubes4/html-to-blocks-converter", - "reference": "6a2f53060402ef97f7e26cc826e392a682b4c3f7" + "reference": "78289412228f3d71cc44136dfdd50ea0aad0b82f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chubes4/html-to-blocks-converter/zipball/6a2f53060402ef97f7e26cc826e392a682b4c3f7", - "reference": "6a2f53060402ef97f7e26cc826e392a682b4c3f7", + "url": "https://api.github.com/repos/chubes4/html-to-blocks-converter/zipball/78289412228f3d71cc44136dfdd50ea0aad0b82f", + "reference": "78289412228f3d71cc44136dfdd50ea0aad0b82f", "shasum": "" }, "require": { @@ -40,7 +40,7 @@ ], "description": "Convert raw HTML into Gutenberg block arrays using WordPress' HTML API.", "homepage": "https://github.com/chubes4/html-to-blocks-converter", - "time": "2026-06-07T21:04:36+00:00" + "time": "2026-06-07T21:24:15+00:00" }, { "name": "dflydev/dot-access-data", From 152c6e63a42392e99fe0505e7f3b7a83f23372f7 Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Sun, 7 Jun 2026 19:17:03 -0400 Subject: [PATCH 4/4] Update h2bc dependency to main --- composer.json | 2 +- composer.lock | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index e972939..80b9a4e 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "require": { "php": "^8.1", - "chubes4/html-to-blocks-converter": "dev-fix-static-form-surrogate-parity", + "chubes4/html-to-blocks-converter": "dev-main", "league/commonmark": "^2.5", "league/html-to-markdown": "^5.1" }, diff --git a/composer.lock b/composer.lock index 53957af..6c42385 100644 --- a/composer.lock +++ b/composer.lock @@ -4,25 +4,26 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "343928b2f3a9da77df759b7787d44dfb", + "content-hash": "5e80def02c25e3d6bc32f7207b51fd81", "packages": [ { "name": "chubes4/html-to-blocks-converter", - "version": "dev-fix-static-form-surrogate-parity", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/chubes4/html-to-blocks-converter", - "reference": "78289412228f3d71cc44136dfdd50ea0aad0b82f" + "reference": "7336776a65393a1e6856de1c4dd87c0637d17ac2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chubes4/html-to-blocks-converter/zipball/78289412228f3d71cc44136dfdd50ea0aad0b82f", - "reference": "78289412228f3d71cc44136dfdd50ea0aad0b82f", + "url": "https://api.github.com/repos/chubes4/html-to-blocks-converter/zipball/7336776a65393a1e6856de1c4dd87c0637d17ac2", + "reference": "7336776a65393a1e6856de1c4dd87c0637d17ac2", "shasum": "" }, "require": { "php": ">=7.4" }, + "default-branch": true, "type": "wordpress-plugin", "autoload": { "files": [ @@ -40,7 +41,7 @@ ], "description": "Convert raw HTML into Gutenberg block arrays using WordPress' HTML API.", "homepage": "https://github.com/chubes4/html-to-blocks-converter", - "time": "2026-06-07T21:24:15+00:00" + "time": "2026-06-07T22:31:38+00:00" }, { "name": "dflydev/dot-access-data",