-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replaceBlock didn't work in office 2016 #1202
Comments
there is nothing inside your block (except whitespace)? (between the two is the xml you give the document before calling when you say it did not work, do you mean that nothing changed in the document? |
public function replaceBlock($blockname, $replacement) {
$this->tempDocumentMainPart = preg_replace(
'/(\${' . $blockname . '})(.*?)(\${\/' . $blockname . '})/is',
$replacement,
$this->tempDocumentMainPart
);
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the funciton replaceBlock in Temproccessor didn't work,debug info below:
the regex is this:
(<\?xml.*)(<w:p.*>\${block_table}<\/w:.*?p>)(.*)(<w:p.*\${\/block_table}<\/w:.*?p>)
and the document.xml like this:
how to fix it
The text was updated successfully, but these errors were encountered: