diff --git a/php-transformer/src/HtmlToBlocks/HtmlTransformer.php b/php-transformer/src/HtmlToBlocks/HtmlTransformer.php index b71aaec4..d5ab581c 100644 --- a/php-transformer/src/HtmlToBlocks/HtmlTransformer.php +++ b/php-transformer/src/HtmlToBlocks/HtmlTransformer.php @@ -1090,7 +1090,15 @@ private function rewriteAuthorSelectorPrelude(string $prelude, bool $controlWrap } $matches = $this->matchingAuthorSourceElements($parsed); if ( array() === $matches ) { - $rewritten[] = $selector; + // A type selector (e.g. `.page-header p`) that matches no source + // element must still be projected through its source-tag marker + // rather than emitted bare. Otherwise a `
` (an eyebrow `
` in the source — makes the rule match exactly what
+ // the author intended and nothing that was structurally promoted.
+ $rewritten[] = $this->rewriteSourceTagTypes($selector, $parsed);
continue;
}
if ( $this->isRootChildSelector($parsed) ) {
@@ -3754,6 +3762,12 @@ private function visualTextWrapperBlockFromElement(DOMElement $element): ?array
// decoration, which the wrapper class still applies to the paragraph. Real
// flex containers hold child elements and are already excluded above by the
// `childElementCount === 0` guard (e.g. `.tier-price` wrapping a ``).
+ //
+ // Descendant paragraph rules the source used a non-`p` tag to escape (e.g.
+ // `.page-header p { font-size: ... }` styling body copy while an eyebrow
+ // authored as ` ` in the source carry.
if ( 0 === $this->childElementCount($element) && ! $this->hasBoxChromeWrapperStyling($element) ) {
return $this->createBlock(
'core/paragraph',
diff --git a/php-transformer/src/HtmlToBlocks/Patterns/NavigationPattern.php b/php-transformer/src/HtmlToBlocks/Patterns/NavigationPattern.php
index 40554e00..38b30114 100644
--- a/php-transformer/src/HtmlToBlocks/Patterns/NavigationPattern.php
+++ b/php-transformer/src/HtmlToBlocks/Patterns/NavigationPattern.php
@@ -30,6 +30,16 @@ public function match(DOMElement $element, PatternContext $context): ?array
return null;
}
+ // A row of button-styled links (e.g. `