Skip to content
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

setMacroChars, setMacroOpeningChars and setMacroClosingChars doesn't work #2671

Open
2 tasks
garubi opened this issue Sep 9, 2024 · 1 comment
Open
2 tasks

Comments

@garubi
Copy link

garubi commented Sep 9, 2024

Describe the bug and add attachments

When using one or more of the mentioned funstions to change the delimiters of the macros to be replaced, nothing is changed.

Expected behavior

$templateProcessor->setMacroChars('[', ']');
then in the template [customer-name] should be changed to John Doe (the customer name)

Steps to reproduce

<?php
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor( $template_dir . $template_name );
// In the templates let's search for tags delimited by [...]
$templateProcessor->setMacroChars('[', ']');
$templateProcessor->setValues($data);
$templateProcessor->saveAs( $upload_dir . $fileName );
?>

PHPWord version(s) where the bug happened

master

PHP version(s) where the bug happened

8.1.23

Priority

  • I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
  • I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants
@garubi and others