Skip to content

Commit 5057617

Browse files
committed
change regex instead of checking twice
1 parent 7c8cfb7 commit 5057617

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/PhpWord/TemplateProcessor.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,7 @@ public function cloneRow($search, $numberOfClones)
612612
// If tmpXmlRow doesn't contain continue, this row is no longer part of the spanned row.
613613
$tmpXmlRow = $this->getSlice($extraRowStart, $extraRowEnd);
614614
if (!preg_match('#<w:vMerge/>#', $tmpXmlRow) &&
615-
!preg_match('#<w:vMerge w:val="continue" />#', $tmpXmlRow) &&
616-
!preg_match('#<w:vMerge w:val="continue"/>#', $tmpXmlRow)) {
615+
!preg_match('#<w:vMerge w:val="continue"\s*/>#', $tmpXmlRow)) {
617616
break;
618617
}
619618
// This row was a spanned row, update $rowEnd and search for the next row.

0 commit comments

Comments
 (0)