From 5f28595ec3ab57aad4787ba278876a15cf376eb3 Mon Sep 17 00:00:00 2001 From: "oe.sonnh" Date: Tue, 7 Jan 2020 11:44:37 +0700 Subject: [PATCH] Fix: CloneBlock regexp for different regexp engine with xml line-drop --- src/PhpWord/TemplateProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 7efc0f1ac8..5247057439 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -737,7 +737,7 @@ public function cloneBlock($blockname, $clones = 1, $replace = true, $indexVaria $xmlBlock = null; $matches = array(); preg_match( - '/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', + '/(.*((?s)))(.*)((?s))/is', $this->tempDocumentMainPart, $matches );