Block wrapper (<center>) merged into an inline synthetic paragraph loses its line box and widens layout-table cells
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
Start by tracing the HTML conversion that merges the <center> wrapper with its inline child and assigns the synthetic paragraph classes; the issue does not name the responsible files or tests. Use the reduced table fixture to compare the wrapped case with the bare-link case, then run php tests/parity/run.php. Done means the wrapped label keeps a block box and the following image starts on a new line, while the bare-link case stays inline and the parity check passes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
A block-level wrapper around only inline content (here <center><font><a>label</a></font></center>) is merged away during conversion. The resulting core/paragraph takes the inline <font>/<a> as its source element, so it gets blocks-engine-synthetic-paragraph without blocks-engine-source-box-paragraph. The engine rule :where(p.blocks-engine-synthetic-paragraph:not(.blocks-engine-source-box-paragraph)){display:inline} then makes it inline.
In the source, the <center> is a block box, so whatever follows starts on a new line. In WordPress the label's last word shares a line with the following inline content. In layout-table cells, that content is the linked image, whose figure is display:contents with an inline img. The cell's min-content width becomes last word + image, and the auto table widens past its authored width.
Real case: physics.uci.edu /~tritz/ (Blocks Engine trunk 925eabd2b4b).
| Sidebar width | Page scrollWidth at 1440 |
Page scrollWidth at 390 |
|
|---|---|---|---|
| Source | 165px | 1440 (no horizontal scroll) | 925 |
| WordPress | 260px ("Photosynthesis" and the 140px image on one line) | 1541 | 1026 |
Reduced repro
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tbody><tr valign="top"><td width="160"><table border="0" cellspacing="0" cellpadding="10" width="160" bgcolor="#000000"><tbody><tr><td align="center"><center><font color="#FFFFCC"><a href="/psu.html" style="color:#FFFFCC;text-decoration:none">Quantum Biology of Photosynthesis</a></font></center><a href="/psu.html"><img src="/media/psu.jpg" alt="Quantum Biology" border="0" height="128" width="140"></a></td></tr><tr><td align="center"><a href="/mag.html">Magnetic Sense</a></td></tr></tbody></table></td><td><h1>Physical Biology</h1><p>The biological sciences currently undergo a revolution comparable to the revolution in physics in the first half of the 20th century.</p><p>Our group focuses on relating the structure of protein assemblies to their function.</p></td></tr></tbody></table>
Output:
<p class="blocks-engine-synthetic-paragraph blocks-engine-synthetic-anchor-undecorated"><mark …><a href="/psu.html">…
This is followed by <figure class="wp-block-image … blocks-engine-synthetic-image-figure-inline">. The paragraph has no source-box class, so it renders display:inline.
Expected
- A paragraph whose content came from a block-level source wrapper (
center,div,p, and so on) that was merged into its only inline child keeps a block box. Mark itblocks-engine-source-box-paragraph, or otherwise emit the line break the wrapper produced. - Content following it in the same cell (the linked image) starts on its own line, as in the source.
- Truly inline sources (loose text, or a bare
<a>or<font>directly in the cell) keep the current inline behaviour.
Verification
- Unit or contract test with the fixture above: the label paragraph carries
blocks-engine-source-box-paragraph, or renders as a block. A sibling case without<center>(bare<a>plus<img>in the cell) still gets the inline synthetic paragraph. - Parity:
php tests/parity/run.phpshows no regressions. - Rendered check: on the physics.uci.edu import,
/~tritz/hasscrollWidth1440 at a 1440px viewport, and the sidebar is about 165px wide.
- Lenguaje dominante
- PHP
- Estrellas
- 31
- Forks
- 7
- Merge medio
- 3 h 40 min
- PR fusionados (30 d)
- 813
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Automattic/blocks-engine
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4943 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4942 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Automattic/blocks-engine#4921 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Automattic/blocks-engine#775 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
Automattic/blocks-engine#7505 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Automattic/blocks-engine
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
phpstan/phpstan-phpunit#361 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
HE-Arc/le-panier-du-coin#49 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días
-
15.0
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
bug: juros do parcelamento travados em 1x no gateway Rede Débito e Crédito 3DS (woo-rede 5.6.0)Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
LinkNacional/woo-rede#367 ·