Skip to content

Commit 0945a37

Browse files
committed
Fixed block capture so that it would work properly with blocks to be cloned in rows
1 parent d9ea617 commit 0945a37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/TemplateProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ protected function indexClonedVariables($count, $xmlBlock)
10851085
{
10861086
$results = array();
10871087
for ($i = 1; $i <= $count; $i++) {
1088-
$results[] = preg_replace('/\$\{(.*?)(:.*)?\}/', '\${\1#' . $i . '\2}', $xmlBlock);
1088+
$results[] = preg_replace('/\$\{([^:]*?)(:.*?)?\}/', '\${\1#' . $i . '\2}', $xmlBlock);
10891089
}
10901090

10911091
return $results;

0 commit comments

Comments
 (0)