Skip to content

Commit

Permalink
fix bypass LI check for blocks that manually get LI wrapper applied
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiankaegy committed Oct 24, 2023
1 parent 216bfd0 commit 245c57d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ function render_block_core_navigation( $attributes, $content, $block ) {
foreach ( $inner_blocks as $inner_block ) {
$inner_block_content = $inner_block->render();
$p = new WP_HTML_Tag_Processor( $inner_block_content );
$is_list_item = $p->next_tag( 'LI' );
$is_list_item = $p->next_tag( 'LI' ) || in_array( $inner_block->name, $needs_list_item_wrapper, true );

if ( $is_list_item && ! $is_list_open ) {
$is_list_open = true;
Expand Down

0 comments on commit 245c57d

Please sign in to comment.