diff --git a/blocks/specification/specification.js b/blocks/specification/specification.js index cf57481..38d8efa 100644 --- a/blocks/specification/specification.js +++ b/blocks/specification/specification.js @@ -38,10 +38,16 @@ export default function decorate(block) { textContent.querySelectorAll('.specification-label').forEach((el) => { const stat = document.createElement('div'); stat.classList.add('specification-stat'); - const valueEl = el.nextElementSibling; + let valueEl = el.nextElementSibling; + + while (valueEl && valueEl.classList.contains('specification-value')) { + const siblingEl = valueEl.nextElementSibling; + stat.append(valueEl); + valueEl = siblingEl; + } + + stat.prepend(el); - stat.append(el); - stat.append(valueEl); specificationStatsWrapper.append(stat); });