Skip to content

Commit

Permalink
Merge 6087305 into 733f845
Browse files Browse the repository at this point in the history
  • Loading branch information
juzser committed Jan 21, 2020
2 parents 733f845 + 6087305 commit 34b4700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpWord/TemplateProcessor.php
Expand Up @@ -737,7 +737,7 @@ public function cloneBlock($blockname, $clones = 1, $replace = true, $indexVaria
$xmlBlock = null;
$matches = array();
preg_match(
'/(<\?xml.*)(<w:p\b.*>\${' . $blockname . '}<\/w:.*?p>)(.*)(<w:p\b.*\${\/' . $blockname . '}<\/w:.*?p>)/is',
'/(.*((?s)<w:p\b(?:(?!<w:p\b).)*?\${' . $blockname . '}<\/w:.*?p>))(.*)((?s)<w:p\b(?:(?!<w:p\b).)[^$]*?\${\/' . $blockname . '}<\/w:.*?p>)/is',
$this->tempDocumentMainPart,
$matches
);
Expand Down

0 comments on commit 34b4700

Please sign in to comment.